13#ifndef mitkUSNavigationStepTimer_h
14#define mitkUSNavigationStepTimer_h
16#include <mitkCommon.h>
18#include <itkObjectFactory.h>
19#include <itkTimeProbe.h>
62 void SetActiveIndex(
unsigned int index, std::string description =
"");
Timer for measureing the durations of navigation steps. The different steps are identified by indices...
void Reset()
Removes all measured durations.
itk::TimeProbe m_TimeProbe
~USNavigationStepTimer() override
void ReadFromFile(std::string filename)
Read durations from the file of the given file name. This file must have exactly the same format as i...
void Stop()
Stops the timer for the current index. The measured time to if written to the output file if a file p...
std::vector< DurationForIndex > DurationsVector
std::string m_CurrentDescription
double GetTotalDuration()
Returns the sum of all durations.
void WriteEverythingToFile()
double GetDurationForIndex(unsigned int index)
Returns measured duration for the step with the given index. All measurements of this index are summe...
void SetActiveIndex(unsigned int index, std::string description="")
Starts measurement for the step with the given index.
std::string m_OutputFileName
mitkClassMacroItkParent(USNavigationStepTimer, itk::Object)
void FinishCurrentIndex()
void WriteLineToFile(const DurationForIndex &element)
itkNewMacro(USNavigationStepTimer)
void SetOutputFileName(std::string filename)
Sets the name of the output file. If there are already measurements of durations, they are written to...
unsigned int m_CurrentIndex
DurationsVector m_Durations
DurationForIndex(unsigned int index, double duration)
DurationForIndex(unsigned int index, double duration, std::string description)