Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkNavigationDataRecorderDeprecated.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 mitkNavigationDataRecorderDeprecated_h
14 #define mitkNavigationDataRecorderDeprecated_h
15 
16 #include <itkProcessObject.h>
17 #include "mitkNavigationData.h"
18 #include "MitkIGTExports.h"
19 #include <iostream>
20 
21 #include <mitkRealTimeClock.h>
22 
23 namespace mitk
24 {
40  class MITKIGT_EXPORT NavigationDataRecorderDeprecated : public itk::ProcessObject
41  {
42  public:
44 
45  itkNewMacro( Self );
46 
55  {
58  ZipFile
59  };
60 
68  {
69  xml,
70  csv
71  };
72 
80  itkSetStringMacro(FileName);
81 
85  itkGetStringMacro(FileName);
86 
90  itkSetMacro(DoNotOverwriteFiles,bool);
91 
95  itkGetMacro(Recording,bool);
96 
100  itkGetMacro(RecordingMode,RecordingMode);
101 
105  itkGetMacro(RecordCounter,int);
106 
110  itkSetMacro(RecordCountLimit,int);
111 
115  virtual void AddNavigationData(const NavigationData* nd);
116 
122  void SetAdditionalAttribute( const NavigationData* nd, const std::string& attributeName
123  , const std::string& attributeValue );
124  void RemoveAdditionalAttribute( const NavigationData* nd );
125 
134  void StartRecording();
135 
142  void StartRecording(std::ostream* stream);
143 
147  void StopRecording();
148 
153  void Update() override;
154 
159  void SetRecordingMode(RecordingMode mode);
160 
166 
167  protected:
168 
173  void GenerateData() override;
174 
176 
178 
179  std::string m_FileName;
180 
181  unsigned int m_NumberOfInputs;
182 
183  std::ostream* m_Stream;
184 
186 
188 
190 
191  bool m_Recording;
192 
194 
196 
197  bool m_firstLine; //for the csv writer to detect wether the header must be written
198 
199  unsigned int m_NumberOfRecordedFiles;
200 
201  mitk::RealTimeClock::Pointer m_SystemTimeClock;
202 
204 
205  std::map<const mitk::NavigationData*, std::pair<std::string, std::string> > m_AdditionalAttributes;
206  };
207 }
208 #endif
mitk::NavigationDataRecorderDeprecated::RecordingMode
RecordingMode
Determines where the output is directed to.
Definition: mitkNavigationDataRecorderDeprecated.h:54
mitk::NavigationDataRecorderDeprecated::xml
@ xml
Definition: mitkNavigationDataRecorderDeprecated.h:69
mitk::NavigationDataRecorderDeprecated::NormalFile
@ NormalFile
Definition: mitkNavigationDataRecorderDeprecated.h:57
mitkRealTimeClock.h
mitk::NavigationDataRecorderDeprecated
This class records NavigationData objects.
Definition: mitkNavigationDataRecorderDeprecated.h:40
mitk::NavigationDataRecorderDeprecated::m_StreamMustBeDeleted
bool m_StreamMustBeDeleted
Definition: mitkNavigationDataRecorderDeprecated.h:185
mitk::NavigationDataRecorderDeprecated::m_DoNotOverwriteFiles
bool m_DoNotOverwriteFiles
do not overwrite any files if true
Definition: mitkNavigationDataRecorderDeprecated.h:203
mitk::NavigationDataRecorderDeprecated::m_SystemTimeClock
mitk::RealTimeClock::Pointer m_SystemTimeClock
system time clock for system time tag in output xml file
Definition: mitkNavigationDataRecorderDeprecated.h:201
mitkNavigationData.h
mitk::NavigationData
Navigation Data.
Definition: mitkNavigationData.h:36
mitk::NavigationDataRecorderDeprecated::m_NumberOfRecordedFiles
unsigned int m_NumberOfRecordedFiles
necessary for the naming of the file if there is more than one start-stop cycle
Definition: mitkNavigationDataRecorderDeprecated.h:199
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::NavigationDataRecorderDeprecated::m_AdditionalAttributes
std::map< const mitk::NavigationData *, std::pair< std::string, std::string > > m_AdditionalAttributes
Definition: mitkNavigationDataRecorderDeprecated.h:205
mitk::NavigationDataRecorderDeprecated::m_OutputFormat
OutputFormatEnum m_OutputFormat
stores the output format; see enum OutputFormat
Definition: mitkNavigationDataRecorderDeprecated.h:189
mitk::NavigationDataRecorderDeprecated::Console
@ Console
Definition: mitkNavigationDataRecorderDeprecated.h:56
mitk::NavigationDataRecorderDeprecated::m_firstLine
bool m_firstLine
Definition: mitkNavigationDataRecorderDeprecated.h:197
mitk::NavigationDataRecorderDeprecated::m_RecordCounter
int m_RecordCounter
counts the number of frames which are recorded since StartRecording
Definition: mitkNavigationDataRecorderDeprecated.h:193
mitk::NavigationDataRecorderDeprecated::m_FileName
std::string m_FileName
stores the file name and path
Definition: mitkNavigationDataRecorderDeprecated.h:179
mitk::NavigationDataRecorderDeprecated::m_RecordCountLimit
int m_RecordCountLimit
limits the number of frames, recording will be stopped if the limit is reached. -1 disables the limit
Definition: mitkNavigationDataRecorderDeprecated.h:195
mitk::NavigationDataRecorderDeprecated::m_Stream
std::ostream * m_Stream
the output stream
Definition: mitkNavigationDataRecorderDeprecated.h:183
mitk::NavigationDataRecorderDeprecated::m_NumberOfInputs
unsigned int m_NumberOfInputs
counts the numbers of added input NavigationDatas
Definition: mitkNavigationDataRecorderDeprecated.h:181
mitk::NavigationDataRecorderDeprecated::OutputFormatEnum
OutputFormatEnum
Determines the output format.
Definition: mitkNavigationDataRecorderDeprecated.h:67
mitk::NavigationDataRecorderDeprecated::m_Recording
bool m_Recording
indicates whether the recording is started or not
Definition: mitkNavigationDataRecorderDeprecated.h:191
mitk::NavigationDataRecorderDeprecated::m_RecordingMode
RecordingMode m_RecordingMode
stores the mode see enum RecordingMode
Definition: mitkNavigationDataRecorderDeprecated.h:187