MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkIGTTimeStamp.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13
14#ifndef mitkIGTTimeStamp_h
15#define mitkIGTTimeStamp_h
16
17#include <itkObject.h>
18#include <itkObjectFactory.h>
19#include <MitkIGTExports.h>
20
21#include "mitkRealTimeClock.h"
22
23
24namespace mitk {
25
48 class MITKIGT_EXPORT IGTTimeStamp : public itk::Object
49 {
50 public:
51
53
62 static IGTTimeStamp* CreateInstance();
63
70 static IGTTimeStamp* GetInstance();
71
83 void Start( itk::Object::Pointer device );
84
93 void Stop( itk::Object::Pointer device );
94
104 double GetElapsed();
105
114 double GetElapsed(itk::Object::Pointer device);
115
116
132 double GetOffset(itk::Object::Pointer Device);
133
147 void SetRealTimeClock(mitk::RealTimeClock::Pointer Clock);
148
157 void Initialize();
158
159 protected:
160
161 IGTTimeStamp();
162
163 ~IGTTimeStamp() override;
164
165 double GetCurrentStamp();
166
167 /* the current timestamp when GetCurrentStamp() is called. */
168 double m_Time;
169
170 /* the timestamp in ms acquired when Start() was called. */
172
173 /* pointer to the RealTimeClock used internally */
174 mitk::RealTimeClock::Pointer m_RealTimeClock;
175
176 /* pointer to the current instance */
177 static mitk::IGTTimeStamp::Pointer s_Instance;
178
179 /* map, in which pointer to all devices calling Start(), are saved */
180 std::map<itk::Object::Pointer, double> m_DeviceMap;
181
182 std::map<itk::Object::Pointer, double>::iterator m_MapIterator;
183 };
184} // namespace mitk
185
186#endif
Time stamp in milliseconds.
std::map< itk::Object::Pointer, double > m_DeviceMap
static mitk::IGTTimeStamp::Pointer s_Instance
mitk::RealTimeClock::Pointer m_RealTimeClock
mitkClassMacroItkParent(IGTTimeStamp, itk::Object)
std::map< itk::Object::Pointer, double >::iterator m_MapIterator
IGT Exceptions.