Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
Medical Imaging Interaction Toolkit
mitkIGTLMeasurements.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef IGTLMeasurements_H_HEADER_INCLUDED_
14 #define IGTLMeasurements_H_HEADER_INCLUDED_
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 
24 namespace 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 /* MITKIGTLMeasurements_H_HEADER_INCLUDED_ */
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKOPENIGTLINK_EXPORT
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
Is a helper class to make measurments for latency and fps.