Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
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 _MITK_NavigationDataRecorderDeprecated_H
14 #define _MITK_NavigationDataRecorderDeprecated_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 // #define _MITK_POINT_SET_SOURCE_H
unsigned int m_NumberOfInputs
counts the numbers of added input NavigationDatas
std::map< const mitk::NavigationData *, std::pair< std::string, std::string > > m_AdditionalAttributes
Navigation Data.
static void Update(vtkPolyData *)
Definition: mitkSurface.cpp:31
DataCollection - Class to facilitate loading/accessing structured data.
int m_RecordCounter
counts the number of frames which are recorded since StartRecording
This class records NavigationData objects.
std::string m_FileName
stores the file name and path
#define MITKIGT_EXPORT
mitk::RealTimeClock::Pointer m_SystemTimeClock
system time clock for system time tag in output xml file
RecordingMode
Determines where the output is directed to.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
bool m_Recording
indicates whether the recording is started or not
RecordingMode m_RecordingMode
stores the mode see enum RecordingMode
unsigned int m_NumberOfRecordedFiles
necessary for the naming of the file if there is more than one start-stop cycle
bool m_DoNotOverwriteFiles
do not overwrite any files if true
OutputFormatEnum m_OutputFormat
stores the output format; see enum OutputFormat
int m_RecordCountLimit
limits the number of frames, recording will be stopped if the limit is reached. -1 disables the limit...