MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitk::NavigationDataRecorder Class Reference

This class records NavigationData objects into NavigationDataSets. More...

#include <mitkNavigationDataRecorder.h>

Inheritance diagram for mitk::NavigationDataRecorder:
mitk::NavigationDataToNavigationDataFilter mitk::NavigationDataSource

Public Member Functions

 mitkClassMacro (NavigationDataRecorder, NavigationDataToNavigationDataFilter)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
 itkGetMacro (Recording, bool)
 Returns whether the NavigationDataRecorder is currently recording or not.
 
 itkGetMacro (NavigationDataSet, mitk::NavigationDataSet::Pointer)
 Returns the set that contains all of the recorded data.
 
 itkSetMacro (RecordCountLimit, int)
 Sets a limit of recorded data sets / frames. Recording will be stopped if the number is reached. values < 1 disable this behaviour. Default is -1.
 
 itkGetMacro (StandardizeTime, bool)
 Returns whether to use the navigationdata's time stamp or to create a new one upon recording.
 
 itkSetMacro (StandardizeTime, bool)
 If set to false, the navigationdata's timestamp will be used. If set to true, the recorder will generate a timestamp when it copies the data to the navigationdataset.
 
 itkSetMacro (RecordOnlyValidData, bool)
 If set to false, invalid navigationDatas will also be used. If set to true, the recorder will record only valid data. Standard is false.
 
 itkGetMacro (RecordOnlyValidData, bool)
 Returns whether to use valid data only.
 
virtual void StartRecording ()
 Starts recording NavigationData into the NavigationDataSet.
 
virtual void StopRecording ()
 Stops StopsRecording to the NavigationDataSet.
 
virtual void ResetRecording ()
 Resets the Datasets and the timestamp, so a new recording can happen.
 
virtual int GetNumberOfRecordedSteps ()
 Returns the number of time steps that were recorded in the current set. Warning: This Method does NOT Stop Recording!
 
- Public Member Functions inherited from mitk::NavigationDataToNavigationDataFilter
 mitkClassMacro (NavigationDataToNavigationDataFilter, NavigationDataSource)
 
virtual void SetInput (const NavigationData *nd)
 Set the input of this filter.
 
virtual void SetInput (unsigned int idx, const NavigationData *nd)
 Set input with id idx of this filter.
 
const NavigationDataGetInput (void) const
 Get the input of this filter.
 
const NavigationDataGetInput (unsigned int idx) const
 Get the input with id idx of this filter.
 
const NavigationDataGetInput (std::string navDataName) const
 Get the input with name navDataName of this filter.
 
DataObjectPointerArraySizeType GetInputIndex (std::string navDataName)
 return the index of the input with name navDataName, throw std::invalid_argument exception if that name was not found
 
virtual void ConnectTo (mitk::NavigationDataSource *UpstreamFilter)
 Connects the input of this filter to the outputs of the given NavigationDataSource.
 
- Public Member Functions inherited from mitk::NavigationDataSource
 mitkClassMacroItkParent (NavigationDataSource, itk::ProcessObject)
 
 itkGetMacro (Name, std::string)
 
 itkSetMacro (Name, std::string)
 Sets the human readable name of this source. There is also a default name, but you can use this method if you need to define it on your own.
 
NavigationDataGetOutput (void)
 return the output (output with id 0) of the filter
 
NavigationDataGetOutput (DataObjectPointerArraySizeType idx)
 return the output with id idx of the filter
 
NavigationDataGetOutput (const std::string &navDataName)
 return the output with name navDataName of the filter
 
NavigationTool::Pointer GetToolMetaData (DataObjectPointerArraySizeType idx)
 
NavigationTool::Pointer GetToolMetaData (const std::string &navDataName)
 
 itkGetMacro (ToolMetaDataCollection, mitk::NavigationToolStorage::Pointer)
 
 itkSetMacro (ToolMetaDataCollection, mitk::NavigationToolStorage::Pointer)
 
DataObjectPointerArraySizeType GetOutputIndex (std::string navDataName)
 return the index of the output with name navDataName, -1 if no output with that name was found
 
virtual void RegisterAsMicroservice ()
 Registers this object as a Microservice, making it available to every module and/or plugin. To unregister, call UnregisterMicroservice().
 
virtual void UnRegisterMicroservice ()
 Registers this object as a Microservice, making it available to every module and/or plugin.
 
std::string GetMicroserviceID ()
 Returns the id that this device is registered with. The id will only be valid, if the NavigationDataSource has been registered using RegisterAsMicroservice().
 
virtual void GraftNthOutput (unsigned int idx, itk::DataObject *graft)
 Graft the specified DataObject onto this ProcessObject's output.
 
virtual void GraftOutput (itk::DataObject *graft)
 Graft the specified DataObject onto this ProcessObject's output.
 
itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
virtual void SetParameters (const mitk::PropertyList *)
 Set all filter parameters as the PropertyList p.
 
virtual mitk::PropertyList::ConstPointer GetParameters () const
 Get all filter parameters as a PropertyList.
 
virtual void Freeze ()
 
virtual void UnFreeze ()
 
 itkGetMacro (IsFrozen, bool)
 

Protected Member Functions

void GenerateData () override
 
 NavigationDataRecorder ()
 
 ~NavigationDataRecorder () override
 
- Protected Member Functions inherited from mitk::NavigationDataToNavigationDataFilter
 NavigationDataToNavigationDataFilter ()
 
 ~NavigationDataToNavigationDataFilter () override
 
void CreateOutputsForAllInputs ()
 Create an output for each input.
 
- Protected Member Functions inherited from mitk::NavigationDataSource
 NavigationDataSource ()
 
 ~NavigationDataSource () override
 

Protected Attributes

unsigned int m_NumberOfInputs
 counts the numbers of added input NavigationDatas
 
mitk::NavigationDataSet::Pointer m_NavigationDataSet
 
bool m_Recording
 indicates whether the recording is started or not
 
bool m_StandardizeTime
 indicates whether one should use the timestamps in NavigationData or create new timestamps upon recording
 
bool m_StandardizedTimeInitialized
 set to true the first time start recording is called.
 
int m_RecordCountLimit
 limits the number of frames, recording will be stopped if the limit is reached. -1 disables the limit
 
bool m_RecordOnlyValidData
 indicates whether only valid data is recorded
 
- Protected Attributes inherited from mitk::NavigationDataSource
std::string m_Name
 
bool m_IsFrozen
 
NavigationToolStorage::Pointer m_ToolMetaDataCollection
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::NavigationDataSource
static const std::string US_INTERFACE_NAME = "org.mitk.services.NavigationDataSource"
 These Constants are used in conjunction with Microservices.
 
static const std::string US_PROPKEY_DEVICENAME = US_INTERFACE_NAME + ".devicename"
 
static const std::string US_PROPKEY_ID = US_INTERFACE_NAME + ".id"
 
static const std::string US_PROPKEY_ISACTIVE = US_INTERFACE_NAME + ".isActive"
 

Detailed Description

This class records NavigationData objects into NavigationDataSets.

Documentation

The recording is started with the call of the method StartRecording(). Now every Update() stores the current state of the added NavigationDatas into the NavigationDataSet. With StopRecording() the stream is stopped, but can be resumed anytime. To start recording to a new NavigationDataSet, call ResetRecording();

Warning
Do not add inputs while the recorder ist recording. The recorder can't handle that and will cause a nullpointer exception.

Definition at line 34 of file mitkNavigationDataRecorder.h.

Constructor & Destructor Documentation

◆ NavigationDataRecorder()

mitk::NavigationDataRecorder::NavigationDataRecorder ( )
protected

Definition at line 16 of file mitkNavigationDataRecorder.cpp.

◆ ~NavigationDataRecorder()

mitk::NavigationDataRecorder::~NavigationDataRecorder ( )
overrideprotected

Definition at line 28 of file mitkNavigationDataRecorder.cpp.

Member Function Documentation

◆ GenerateData()

void mitk::NavigationDataRecorder::GenerateData ( )
overrideprotected

Definition at line 33 of file mitkNavigationDataRecorder.cpp.

◆ GetNumberOfRecordedSteps()

int mitk::NavigationDataRecorder::GetNumberOfRecordedSteps ( )
virtual

Returns the number of time steps that were recorded in the current set. Warning: This Method does NOT Stop Recording!

Definition at line 120 of file mitkNavigationDataRecorder.cpp.

◆ itkCloneMacro()

mitk::NavigationDataRecorder::itkCloneMacro ( Self )

◆ itkFactorylessNewMacro()

mitk::NavigationDataRecorder::itkFactorylessNewMacro ( Self )

◆ itkGetMacro() [1/4]

mitk::NavigationDataRecorder::itkGetMacro ( NavigationDataSet ,
mitk::NavigationDataSet::Pointer  )

Returns the set that contains all of the recorded data.

◆ itkGetMacro() [2/4]

mitk::NavigationDataRecorder::itkGetMacro ( Recording ,
bool  )

Returns whether the NavigationDataRecorder is currently recording or not.

◆ itkGetMacro() [3/4]

mitk::NavigationDataRecorder::itkGetMacro ( RecordOnlyValidData ,
bool  )

Returns whether to use valid data only.

◆ itkGetMacro() [4/4]

mitk::NavigationDataRecorder::itkGetMacro ( StandardizeTime ,
bool  )

Returns whether to use the navigationdata's time stamp or to create a new one upon recording.

◆ itkSetMacro() [1/3]

mitk::NavigationDataRecorder::itkSetMacro ( RecordCountLimit ,
int  )

Sets a limit of recorded data sets / frames. Recording will be stopped if the number is reached. values < 1 disable this behaviour. Default is -1.

◆ itkSetMacro() [2/3]

mitk::NavigationDataRecorder::itkSetMacro ( RecordOnlyValidData ,
bool  )

If set to false, invalid navigationDatas will also be used. If set to true, the recorder will record only valid data. Standard is false.

◆ itkSetMacro() [3/3]

mitk::NavigationDataRecorder::itkSetMacro ( StandardizeTime ,
bool  )

If set to false, the navigationdata's timestamp will be used. If set to true, the recorder will generate a timestamp when it copies the data to the navigationdataset.

◆ mitkClassMacro()

mitk::NavigationDataRecorder::mitkClassMacro ( NavigationDataRecorder ,
NavigationDataToNavigationDataFilter  )

◆ ResetRecording()

void mitk::NavigationDataRecorder::ResetRecording ( )
virtual

Resets the Datasets and the timestamp, so a new recording can happen.

Do not forget to save the old Dataset, it will be lost after calling this function.

Definition at line 109 of file mitkNavigationDataRecorder.cpp.

◆ StartRecording()

void mitk::NavigationDataRecorder::StartRecording ( )
virtual

Starts recording NavigationData into the NavigationDataSet.

Definition at line 81 of file mitkNavigationDataRecorder.cpp.

◆ StopRecording()

void mitk::NavigationDataRecorder::StopRecording ( )
virtual

Stops StopsRecording to the NavigationDataSet.

Recording can be resumed to the same Dataset by just calling StartRecording() again. Call ResetRecording() to start recording to a new Dataset;

Definition at line 99 of file mitkNavigationDataRecorder.cpp.

Member Data Documentation

◆ m_NavigationDataSet

mitk::NavigationDataSet::Pointer mitk::NavigationDataRecorder::m_NavigationDataSet
protected

Definition at line 117 of file mitkNavigationDataRecorder.h.

◆ m_NumberOfInputs

unsigned int mitk::NavigationDataRecorder::m_NumberOfInputs
protected

counts the numbers of added input NavigationDatas

Definition at line 115 of file mitkNavigationDataRecorder.h.

◆ m_RecordCountLimit

int mitk::NavigationDataRecorder::m_RecordCountLimit
protected

limits the number of frames, recording will be stopped if the limit is reached. -1 disables the limit

Definition at line 125 of file mitkNavigationDataRecorder.h.

◆ m_Recording

bool mitk::NavigationDataRecorder::m_Recording
protected

indicates whether the recording is started or not

Definition at line 119 of file mitkNavigationDataRecorder.h.

◆ m_RecordOnlyValidData

bool mitk::NavigationDataRecorder::m_RecordOnlyValidData
protected

indicates whether only valid data is recorded

Definition at line 127 of file mitkNavigationDataRecorder.h.

◆ m_StandardizedTimeInitialized

bool mitk::NavigationDataRecorder::m_StandardizedTimeInitialized
protected

set to true the first time start recording is called.

Definition at line 123 of file mitkNavigationDataRecorder.h.

◆ m_StandardizeTime

bool mitk::NavigationDataRecorder::m_StandardizeTime
protected

indicates whether one should use the timestamps in NavigationData or create new timestamps upon recording

Definition at line 121 of file mitkNavigationDataRecorder.h.


The documentation for this class was generated from the following files: