MITK-IGT
IGT Extension of MITK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
mitkNavigationDataRecorderDeprecated.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 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
23namespace mitk
24{
40 class MITKIGT_EXPORT NavigationDataRecorderDeprecated : public itk::ProcessObject
41 {
42 public:
44
45 itkNewMacro( Self );
46
55 {
58 ZipFile
59 };
60
68 {
70 csv
71 };
72
81
86
90 itkSetMacro(DoNotOverwriteFiles,bool);
91
95 itkGetMacro(Recording,bool);
96
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
192
194
196
197 bool m_firstLine; //for the csv writer to detect wether the header must be written
198
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
This class records NavigationData objects.
itkSetMacro(DoNotOverwriteFiles, bool)
If true the recorder will never overwrite a file.
mitkClassMacroItkParent(NavigationDataRecorderDeprecated, itk::ProcessObject)
bool m_Recording
indicates whether the recording is started or not
int m_RecordCounter
counts the number of frames which are recorded since StartRecording
std::map< const mitk::NavigationData *, std::pair< std::string, std::string > > m_AdditionalAttributes
bool m_DoNotOverwriteFiles
do not overwrite any files if true
itkGetStringMacro(FileName)
Returns the file name of the recording file (in OutputMode NormalFile and ZipFile)
unsigned int m_NumberOfInputs
counts the numbers of added input NavigationDatas
itkSetMacro(OutputFormat, mitk::NavigationDataRecorderDeprecated::OutputFormatEnum)
Sets the output format which causes different formats of output streams. The XML format is default....
mitk::RealTimeClock::Pointer m_SystemTimeClock
system time clock for system time tag in output xml file
itkGetMacro(Recording, bool)
Returns whether the NavigationDataRecorderDeprecated is recording or not.
itkSetMacro(RecordCountLimit, int)
Sets a limit of recorded data sets / frames. Recording will be stopped if the number is reached....
itkGetMacro(RecordingMode, RecordingMode)
Returns the recording mode.
std::string m_FileName
stores the file name and path
unsigned int m_NumberOfRecordedFiles
necessary for the naming of the file if there is more than one start-stop cycle
itkGetMacro(RecordCounter, int)
Returns the number of data sets / frames which were recorded by the NavigationDataRecorderDeprecated ...
RecordingMode m_RecordingMode
stores the mode see enum RecordingMode
int m_RecordCountLimit
limits the number of frames, recording will be stopped if the limit is reached. -1 disables the limit
RecordingMode
Determines where the output is directed to.
itkSetStringMacro(FileName)
sets the file name for the OutputMode NormalFile and ZipFile
OutputFormatEnum m_OutputFormat
stores the output format; see enum OutputFormat
IGT Exceptions.