![]() |
Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <elxTimer.h>
Public Types | |
typedef itk::SmartPointer < const Self > | ConstPointer |
typedef itk::SmartPointer< Self > | Pointer |
typedef Timer | Self |
typedef itk::Object | Superclass |
typedef std::vector < std::vcl_size_t > | TimeDHMSType |
Public Member Functions | |
int | ElapsedClockAndTime (void) |
virtual const char * | GetClassName () const |
virtual double | GetElapsedClock () const |
virtual double | GetElapsedClockSec () const |
virtual double | GetElapsedTime () const |
virtual std::vcl_size_t | GetElapsedTimeSec () const |
virtual time_t | GetStartTime () const |
virtual time_t | GetStopTime () const |
const std::string & | PrintElapsedClock (void) |
const std::string & | PrintElapsedClockSec (void) |
const std::string & | PrintElapsedTimeDHMS (void) |
const std::string & | PrintElapsedTimeSec (void) |
const std::string & | PrintStartTime (void) |
const std::string & | PrintStopTime (void) |
void | StartTimer (void) |
int | StopTimer (void) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
Timer () | |
virtual | ~Timer () |
Protected Attributes | |
clock_t | m_ElapsedClock |
double | m_ElapsedClockSec |
std::string | m_ElapsedClockSecString |
std::string | m_ElapsedClockString |
double | m_ElapsedTime |
TimeDHMSType | m_ElapsedTimeDHMS |
std::string | m_ElapsedTimeDHMSString |
std::vcl_size_t | m_ElapsedTimeSec |
std::string | m_ElapsedTimeSecString |
clock_t | m_StartClock |
time_t | m_StartTime |
std::string | m_StartTimeString |
clock_t | m_StopClock |
time_t | m_StopTime |
std::string | m_StopTimeString |
Private Member Functions | |
void | operator= (const Self &) |
Timer (const Self &) | |
A class to time the different parts of the registration.
This class is a wrap around ctime.h. It is used to time the registration, to get the time per iteration, or whatever.
For precise timings we use clock() or clock_gettime(). On Windows clock_gettime() does not exist. clock() seems to give accurate timings, also on multi-threaded systems. For GCC / linux we use clock_gettime(), since clock() reports erroneous results on linux on multi-threaded systems: it reports the elapsed time multiplied by the number of threads that have been used. Ugly #ifdefs are needed however, and elxCommon requires linking to the library rt, but on linux only.
Definition at line 66 of file elxTimer.h.
typedef itk::SmartPointer<const Self> tmr::Timer::ConstPointer |
Definition at line 73 of file elxTimer.h.
typedef itk::SmartPointer<Self> tmr::Timer::Pointer |
Definition at line 72 of file elxTimer.h.
typedef Timer tmr::Timer::Self |
Standard ITK-stuff.
Definition at line 70 of file elxTimer.h.
typedef itk::Object tmr::Timer::Superclass |
Definition at line 71 of file elxTimer.h.
typedef std::vector<std::vcl_size_t> tmr::Timer::TimeDHMSType |
My typedef's.
Definition at line 79 of file elxTimer.h.
|
protected |
|
inlineprotectedvirtual |
Definition at line 111 of file elxTimer.h.
|
private |
int tmr::Timer::ElapsedClockAndTime | ( | void | ) |
|
virtual |
Run-time type information (and related methods).
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Communication with outside world.
|
virtual |
|
static |
Method for creation through the object factory.
|
private |
const std::string& tmr::Timer::PrintElapsedClock | ( | void | ) |
const std::string& tmr::Timer::PrintElapsedClockSec | ( | void | ) |
const std::string& tmr::Timer::PrintElapsedTimeDHMS | ( | void | ) |
const std::string& tmr::Timer::PrintElapsedTimeSec | ( | void | ) |
const std::string& tmr::Timer::PrintStartTime | ( | void | ) |
Formatted Output Functions (return the time as a string, with comments)
const std::string& tmr::Timer::PrintStopTime | ( | void | ) |
void tmr::Timer::StartTimer | ( | void | ) |
Member functions.
int tmr::Timer::StopTimer | ( | void | ) |
|
protected |
Definition at line 119 of file elxTimer.h.
|
protected |
Definition at line 122 of file elxTimer.h.
|
protected |
Definition at line 137 of file elxTimer.h.
|
protected |
Definition at line 136 of file elxTimer.h.
|
protected |
Definition at line 118 of file elxTimer.h.
|
protected |
Definition at line 120 of file elxTimer.h.
|
protected |
Definition at line 134 of file elxTimer.h.
|
protected |
Definition at line 121 of file elxTimer.h.
|
protected |
Definition at line 135 of file elxTimer.h.
|
protected |
Definition at line 115 of file elxTimer.h.
|
protected |
Variables that store program arguments.
Definition at line 111 of file elxTimer.h.
|
protected |
GCC specific. We can use clock_gettime(). Strings that serve as output of the Formatted Output Functions
Definition at line 132 of file elxTimer.h.
|
protected |
Definition at line 117 of file elxTimer.h.
|
protected |
Definition at line 116 of file elxTimer.h.
|
protected |
Definition at line 133 of file elxTimer.h.
Generated on 05-01-2014 for elastix by ![]() |
![]() |