MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkIGTLMeasurements.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#ifndef mitkIGTLMeasurements_h
14#define mitkIGTLMeasurements_h
15
16// Microservices
17#include <mitkServiceInterface.h>
18#include <usServiceRegistration.h>
19
20#include "MitkOpenIGTLinkExports.h"
21#include "itkObject.h"
22#include "mitkCommon.h"
23
24namespace mitk {
25
31 class MITKOPENIGTLINK_EXPORT IGTLMeasurements : public itk::Object
32 {
33 public:
35 static IGTLMeasurements* GetInstance();
36
43 void AddMeasurement(unsigned int measurementPoint, unsigned int index, long long timestamp = 0);
44
45
49 bool ExportData(std::string filename);
50
54 void Reset();
55
56 void SetStarted(bool started);
57
58 private:
59 // Only our module activator class should be able to instantiate
60 // a SingletonOneService object.
61 friend class IGTLModuleActivator;
62
63 itkFactorylessNewMacro(Self)
64 //itkCloneMacro(Self)
65
67 ~IGTLMeasurements() override;
68
69 // Disable copy constructor and assignment operator.
71 IGTLMeasurements& operator=(const IGTLMeasurements&);
72
73 //protected:
74 //IGTLMeasurementsImplementation::Pointer m_Measurements;
75
76 typedef std::pair<long long, unsigned int> TimeStampIndexPair;
77 typedef std::list<TimeStampIndexPair> MeasurementList;
78 typedef std::map<unsigned int, MeasurementList> MeasurementPoints;
79
80 MeasurementPoints m_MeasurementPoints;
81
82 bool m_IsStarted;
83 };
84} // namespace mitk
85#endif
Is a helper class to make measurments for latency and fps.
mitkClassMacroItkParent(IGTLMeasurements, itk::Object)
Registers services for IGTL module.
IGT Exceptions.