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

IGTLinkMessageToNavigationDataFilter is a filter that receives OpenIGTLink messages as input and produce NavigationDatas as output. More...

#include <mitkIGTLMessageToNavigationDataFilter.h>

Inheritance diagram for mitk::IGTLMessageToNavigationDataFilter:
mitk::NavigationDataSource

Public Member Functions

 mitkClassMacro (IGTLMessageToNavigationDataFilter, NavigationDataSource)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
virtual void SetInput (const IGTLMessage *msg)
 Set the input of this filter.
 
virtual void SetInput (unsigned int idx, const IGTLMessage *msg)
 Set input with id idx of this filter.
 
const IGTLMessageGetInput (void) const
 Get the input of this filter.
 
const IGTLMessageGetInput (unsigned int idx) const
 Get the input with id idx of this filter.
 
const IGTLMessageGetInput (std::string messageName) const
 Get the input with name messageName of this filter.
 
DataObjectPointerArraySizeType GetInputIndex (std::string messageName)
 return the index of the input with name messageName, throw std::invalid_argument exception if that name was not found
 
virtual void ConnectTo (mitk::IGTLMessageSource *UpstreamFilter)
 Connects the input of this filter to the outputs of the given IGTLMessageSource.
 
void SetNumberOfExpectedOutputs (unsigned int numOutputs)
 Sets the number of expected outputs.
 
- 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

 IGTLMessageToNavigationDataFilter ()
 
 ~IGTLMessageToNavigationDataFilter () override
 
void GenerateData () override
 
void GenerateTransformData ()
 
void GenerateTrackingDataData ()
 
void GenerateQuaternionTrackingDataData ()
 
void CreateOutputsForAllInputs ()
 Create an output for each input.
 
void GenerateOutputInformation () override
 Defines how the input will be copied into the output.
 
- Protected Member Functions inherited from mitk::NavigationDataSource
 NavigationDataSource ()
 
 ~NavigationDataSource () override
 

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"
 
- Protected Attributes inherited from mitk::NavigationDataSource
std::string m_Name
 
bool m_IsFrozen
 
NavigationToolStorage::Pointer m_ToolMetaDataCollection
 

Detailed Description

IGTLinkMessageToNavigationDataFilter is a filter that receives OpenIGTLink messages as input and produce NavigationDatas as output.

Documentation

IGTLinkMessageToNavigationDataFilter is a filter that receives OpenIGTLink messages as input and produce NavigationDatas as output. If the OpenIGTLink message is not of the proper type the filter will not do anything.

Definition at line 35 of file mitkIGTLMessageToNavigationDataFilter.h.

Constructor & Destructor Documentation

◆ IGTLMessageToNavigationDataFilter()

mitk::IGTLMessageToNavigationDataFilter::IGTLMessageToNavigationDataFilter ( )
protected

Definition at line 20 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ ~IGTLMessageToNavigationDataFilter()

mitk::IGTLMessageToNavigationDataFilter::~IGTLMessageToNavigationDataFilter ( )
overrideprotected

Definition at line 28 of file mitkIGTLMessageToNavigationDataFilter.cpp.

Member Function Documentation

◆ ConnectTo()

void mitk::IGTLMessageToNavigationDataFilter::ConnectTo ( mitk::IGTLMessageSource * UpstreamFilter)
virtual

Connects the input of this filter to the outputs of the given IGTLMessageSource.

This method does not support smartpointer. use FilterX.GetPointer() to retrieve a dumbpointer.

Definition at line 100 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ CreateOutputsForAllInputs()

void mitk::IGTLMessageToNavigationDataFilter::CreateOutputsForAllInputs ( )
protected

Create an output for each input.

This Method sets the number of outputs to the number of inputs and creates missing outputs objects.

Warning
any additional outputs that exist before the method is called are deleted

Definition at line 117 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GenerateData()

void mitk::IGTLMessageToNavigationDataFilter::GenerateData ( )
overrideprotected

Definition at line 375 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GenerateOutputInformation()

void mitk::IGTLMessageToNavigationDataFilter::GenerateOutputInformation ( )
overrideprotected

Defines how the input will be copied into the output.

Definition at line 415 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GenerateQuaternionTrackingDataData()

void mitk::IGTLMessageToNavigationDataFilter::GenerateQuaternionTrackingDataData ( )
protected

Definition at line 297 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GenerateTrackingDataData()

void mitk::IGTLMessageToNavigationDataFilter::GenerateTrackingDataData ( )
protected

Definition at line 198 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GenerateTransformData()

void mitk::IGTLMessageToNavigationDataFilter::GenerateTransformData ( )
protected

Definition at line 136 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GetInput() [1/3]

const mitk::IGTLMessage * mitk::IGTLMessageToNavigationDataFilter::GetInput ( std::string messageName) const

Get the input with name messageName of this filter.

Definition at line 70 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GetInput() [2/3]

const mitk::IGTLMessage * mitk::IGTLMessageToNavigationDataFilter::GetInput ( unsigned int idx) const

Get the input with id idx of this filter.

Definition at line 61 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GetInput() [3/3]

const mitk::IGTLMessage * mitk::IGTLMessageToNavigationDataFilter::GetInput ( void ) const

Get the input of this filter.

Set an input

Definition at line 52 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ GetInputIndex()

itk::ProcessObject::DataObjectPointerArraySizeType mitk::IGTLMessageToNavigationDataFilter::GetInputIndex ( std::string messageName)

return the index of the input with name messageName, throw std::invalid_argument exception if that name was not found

Definition at line 86 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ itkCloneMacro()

mitk::IGTLMessageToNavigationDataFilter::itkCloneMacro ( Self )

◆ itkFactorylessNewMacro()

mitk::IGTLMessageToNavigationDataFilter::itkFactorylessNewMacro ( Self )

◆ mitkClassMacro()

mitk::IGTLMessageToNavigationDataFilter::mitkClassMacro ( IGTLMessageToNavigationDataFilter ,
NavigationDataSource  )

◆ SetInput() [1/2]

void mitk::IGTLMessageToNavigationDataFilter::SetInput ( const IGTLMessage * msg)
virtual

Set the input of this filter.

Warning
: this will set the number of outputs to the number of inputs, deleting any extra outputs that might have been initialized. Subclasses that have a different number of outputs than inputs must overwrite the SetInput methods.

Definition at line 32 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ SetInput() [2/2]

void mitk::IGTLMessageToNavigationDataFilter::SetInput ( unsigned int idx,
const IGTLMessage * msg )
virtual

Set input with id idx of this filter.

Warning
: this will set the number of outputs to the number of inputs, deleting any extra outputs that might have been initialized. Subclasses that have a different number of outputs than inputs must overwrite the SetInput methods. If the last input is set to nullptr, the number of inputs will be decreased by one (-> removing the last input). If other inputs are set to nullptr, the number of inputs will not change.

Definition at line 37 of file mitkIGTLMessageToNavigationDataFilter.cpp.

◆ SetNumberOfExpectedOutputs()

void mitk::IGTLMessageToNavigationDataFilter::SetNumberOfExpectedOutputs ( unsigned int numOutputs)

Sets the number of expected outputs.

Normally, this is done automatically by the filter concept. However, in our case we can not know, for example, how many tracking elements are stored in the incoming igtl message. Therefore, we have to set the number here to the expected value.

Definition at line 110 of file mitkIGTLMessageToNavigationDataFilter.cpp.


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