Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
This class records NavigationData objects. More...
#include <mitkNavigationDataRecorderDeprecated.h>
Public Types | |
enum | RecordingMode { Console, NormalFile, ZipFile } |
Determines where the output is directed to. More... | |
enum | OutputFormatEnum { xml, csv } |
Determines the output format. More... | |
Public Member Functions | |
mitkClassMacroItkParent (NavigationDataRecorderDeprecated, itk::ProcessObject) | |
virtual void | SetFileName (const char *_arg) |
sets the file name for the OutputMode NormalFile and ZipFile More... | |
virtual const char * | GetFileName () const |
Returns the file name of the recording file (in OutputMode NormalFile and ZipFile) More... | |
virtual void | SetDoNotOverwriteFiles (bool _arg) |
If true the recorder will never overwrite a file. More... | |
virtual bool | GetRecording () |
Returns whether the NavigationDataRecorderDeprecated is recording or not. More... | |
virtual RecordingMode | GetRecordingMode () |
Returns the recording mode. More... | |
virtual int | GetRecordCounter () |
Returns the number of data sets / frames which were recorded by the NavigationDataRecorderDeprecated since start. More... | |
virtual void | SetRecordCountLimit (int _arg) |
Sets a limit of recorded data sets / frames. Recording will be stopped if the number is reached. -1 disables the limit, -1 is default value as well. More... | |
virtual void | AddNavigationData (const NavigationData *nd) |
Adds the input NavigationDatas. More... | |
void | SetAdditionalAttribute (const NavigationData *nd, const std::string &attributeName, const std::string &attributeValue) |
void | RemoveAdditionalAttribute (const NavigationData *nd) |
void | StartRecording () |
Starts the recording with the presetted OutputMode. This method calls StartRecording(std::ostream*). Does nothing if the recorder is already recording and the method StartRecording is called again. More... | |
void | StartRecording (std::ostream *stream) |
Starts the recording with an own preinitialized stream Does nothing if it is already recording and method StartRecorded is called. More... | |
void | StopRecording () |
Stops the recording and closes the stream. More... | |
virtual void | Update () |
Every call of update causes one line for each added NavigationData in the output if the recording was started. More... | |
void | SetRecordingMode (RecordingMode mode) |
Sets the recording mode which causes different types of output streams see enum RecordingMode. More... | |
virtual void | SetOutputFormat (mitk::NavigationDataRecorderDeprecated::OutputFormatEnum _arg) |
Sets the output format which causes different formats of output streams. The XML format is default. Also see enum OutputFormat for more information. More... | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
virtual void | GenerateData () override |
filter execute method here it is not used More... | |
NavigationDataRecorderDeprecated () | |
virtual | ~NavigationDataRecorderDeprecated () |
Protected Attributes | |
std::string | m_FileName |
stores the file name and path More... | |
unsigned int | m_NumberOfInputs |
counts the numbers of added input NavigationDatas More... | |
std::ostream * | m_Stream |
the output stream More... | |
bool | m_StreamMustBeDeleted |
RecordingMode | m_RecordingMode |
stores the mode see enum RecordingMode More... | |
OutputFormatEnum | m_OutputFormat |
stores the output format; see enum OutputFormat More... | |
bool | m_Recording |
indicates whether the recording is started or not More... | |
int | m_RecordCounter |
counts the number of frames which are recorded since StartRecording More... | |
int | m_RecordCountLimit |
limits the number of frames, recording will be stopped if the limit is reached. -1 disables the limit More... | |
bool | m_firstLine |
unsigned int | m_NumberOfRecordedFiles |
necessary for the naming of the file if there is more than one start-stop cycle More... | |
mitk::RealTimeClock::Pointer | m_SystemTimeClock |
system time clock for system time tag in output xml file More... | |
bool | m_DoNotOverwriteFiles |
do not overwrite any files if true More... | |
std::map< const mitk::NavigationData *, std::pair< std::string, std::string > > | m_AdditionalAttributes |
This class records NavigationData objects.
Documentation The output of this class is formated as a XML document.
Internal this class uses streams for recording NavigationData objects. Therefore different types of output are possible and can be set with the SetOutputMode() method. The default output is directed to the console. If you want to save into a file you have to set a file name and the path. The recording is started with the call of the method StartRecording(). Now every Update() stores the current state of the added NavigationDatas. With StopRecording() the stream is stopped. With another call of StartRecording() the output is written to a new file with incremented filename counter.
Definition at line 44 of file mitkNavigationDataRecorderDeprecated.h.
Determines the output format.
Documentation xml: XML format, also default, can be read by NavigationDataPlayer csv: use to export in excel, matlab, etc.
Enumerator | |
---|---|
xml | |
csv |
Definition at line 71 of file mitkNavigationDataRecorderDeprecated.h.
Determines where the output is directed to.
Documentation Console: std::cout NormalFile: std::ofstream ZipFile: Not supported yet -> std::cout
Enumerator | |
---|---|
Console | |
NormalFile | |
ZipFile |
Definition at line 58 of file mitkNavigationDataRecorderDeprecated.h.
|
protected |
Definition at line 27 of file mitkNavigationDataRecorderDeprecated.cpp.
References mitk::IGTTimeStamp::GetInstance(), m_DoNotOverwriteFiles, m_FileName, m_NumberOfInputs, m_NumberOfRecordedFiles, m_OutputFormat, m_RecordCounter, m_RecordCountLimit, m_Recording, m_RecordingMode, m_Stream, m_StreamMustBeDeleted, m_SystemTimeClock, mitk::RealTimeClock::New(), NormalFile, mitk::IGTTimeStamp::Start(), and xml.
|
protectedvirtual |
Definition at line 47 of file mitkNavigationDataRecorderDeprecated.cpp.
|
virtual |
Adds the input NavigationDatas.
Definition at line 57 of file mitkNavigationDataRecorderDeprecated.cpp.
|
overrideprotectedvirtual |
filter execute method here it is not used
Documentation
Definition at line 52 of file mitkNavigationDataRecorderDeprecated.cpp.
|
virtual |
Returns the file name of the recording file (in OutputMode NormalFile and ZipFile)
|
virtual |
Returns the number of data sets / frames which were recorded by the NavigationDataRecorderDeprecated since start.
|
virtual |
Returns whether the NavigationDataRecorderDeprecated is recording or not.
|
virtual |
Returns the recording mode.
mitk::NavigationDataRecorderDeprecated::mitkClassMacroItkParent | ( | NavigationDataRecorderDeprecated | , |
itk::ProcessObject | |||
) |
|
static |
void mitk::NavigationDataRecorderDeprecated::RemoveAdditionalAttribute | ( | const NavigationData * | nd | ) |
Definition at line 232 of file mitkNavigationDataRecorderDeprecated.cpp.
void mitk::NavigationDataRecorderDeprecated::SetAdditionalAttribute | ( | const NavigationData * | nd, |
const std::string & | attributeName, | ||
const std::string & | attributeValue | ||
) |
set an additional attribute for a specified navigation data this will be written for each navigation data and may be updated before calling Update()
Definition at line 216 of file mitkNavigationDataRecorderDeprecated.cpp.
|
virtual |
If true the recorder will never overwrite a file.
|
virtual |
sets the file name for the OutputMode NormalFile and ZipFile
Any extensions will be cut
|
virtual |
Sets the output format which causes different formats of output streams. The XML format is default. Also see enum OutputFormat for more information.
Documentation
|
virtual |
Sets a limit of recorded data sets / frames. Recording will be stopped if the number is reached. -1 disables the limit, -1 is default value as well.
void mitk::NavigationDataRecorderDeprecated::SetRecordingMode | ( | RecordingMode | mode | ) |
Sets the recording mode which causes different types of output streams see enum RecordingMode.
Documentation
Definition at line 68 of file mitkNavigationDataRecorderDeprecated.cpp.
void mitk::NavigationDataRecorderDeprecated::StartRecording | ( | ) |
Starts the recording with the presetted OutputMode. This method calls StartRecording(std::ostream*). Does nothing if the recorder is already recording and the method StartRecording is called again.
Documentation
mitk::IGTException | Throws an exception if no file name or file path is set. |
Definition at line 240 of file mitkNavigationDataRecorderDeprecated.cpp.
References Console, csv, MITK_ERROR, MITK_WARN, and mitkThrowException.
void mitk::NavigationDataRecorderDeprecated::StartRecording | ( | std::ostream * | stream | ) |
Starts the recording with an own preinitialized stream Does nothing if it is already recording and method StartRecorded is called.
Documentation
mitk::IGTException | Throws an exception if the stream is not good. |
m_Stream << "<Version Ver=\"1" />" << std::endl;
Definition at line 312 of file mitkNavigationDataRecorderDeprecated.cpp.
References MITK_WARN, mitkThrowException, and xml.
void mitk::NavigationDataRecorderDeprecated::StopRecording | ( | ) |
Stops the recording and closes the stream.
Documentation
Definition at line 344 of file mitkNavigationDataRecorderDeprecated.cpp.
References xml.
|
virtual |
Every call of update causes one line for each added NavigationData in the output if the recording was started.
Documentation
Definition at line 74 of file mitkNavigationDataRecorderDeprecated.cpp.
References csv, mitk::NavigationData::GetCovErrorMatrix(), mitk::IGTTimeStamp::GetElapsed(), mitk::NavigationData::GetHasOrientation(), mitk::NavigationData::GetHasPosition(), mitk::IGTTimeStamp::GetInstance(), mitk::NavigationData::GetOrientation(), mitk::NavigationData::GetPosition(), mitk::NavigationData::IsDataValid(), and xml.
|
protected |
Definition at line 209 of file mitkNavigationDataRecorderDeprecated.h.
|
protected |
do not overwrite any files if true
Definition at line 207 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
stores the file name and path
Definition at line 183 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
Definition at line 201 of file mitkNavigationDataRecorderDeprecated.h.
|
protected |
counts the numbers of added input NavigationDatas
Definition at line 185 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
necessary for the naming of the file if there is more than one start-stop cycle
Definition at line 203 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
stores the output format; see enum OutputFormat
Definition at line 193 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
counts the number of frames which are recorded since StartRecording
Definition at line 197 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
limits the number of frames, recording will be stopped if the limit is reached. -1 disables the limit
Definition at line 199 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
indicates whether the recording is started or not
Definition at line 195 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
stores the mode see enum RecordingMode
Definition at line 191 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
the output stream
Definition at line 187 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
Definition at line 189 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().
|
protected |
system time clock for system time tag in output xml file
Definition at line 205 of file mitkNavigationDataRecorderDeprecated.h.
Referenced by NavigationDataRecorderDeprecated().