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

This filter creates IGTL messages from mitk::NavigaitionData objects. More...

#include <mitkNavigationDataToIGTLMessageFilter.h>

Inheritance diagram for mitk::NavigationDataToIGTLMessageFilter:
mitk::IGTLMessageSource

Public Types

enum  OperationMode { ModeSendQTransMsg , ModeSendTransMsg , ModeSendQTDataMsg , ModeSendTDataMsg }
 There are four different operation modes. More...
 

Public Member Functions

 mitkClassMacro (NavigationDataToIGTLMessageFilter, IGTLMessageSource)
 
 itkFactorylessNewMacro (Self)
 
 itkCloneMacro (Self)
 
void GenerateData () override
 filter execute method
 
virtual void SetInput (const mitk::NavigationData *NavigationData)
 Sets one input NavigationData.
 
virtual void SetInput (unsigned int idx, const NavigationData *nd)
 Sets the input NavigationData at a specific index.
 
const mitk::NavigationDataGetInput ()
 Returns the input of this filter.
 
const mitk::NavigationDataGetInput (unsigned int idx)
 Returns the input number idx of this filter.
 
virtual void SetOperationMode (OperationMode mode)
 Sets the mode of this filter.
 
 itkGetConstMacro (OperationMode, OperationMode)
 returns the mode of this filter.
 
void GenerateOutputInformation () override
 
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::IGTLMessageSource
 mitkClassMacroItkParent (IGTLMessageSource, 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.
 
 itkGetMacro (Type, std::string)
 
 itkSetMacro (Type, std::string)
 Sets the human readable type of this source. There will be a default type, or you can set the name with the method SetType(). You have to set this parameter otherwise it will not be found by the message provider.
 
IGTLMessageGetOutput (void)
 return the output (output with id 0) of the filter
 
IGTLMessageGetOutput (DataObjectPointerArraySizeType idx)
 return the output with id idx of the filter
 
IGTLMessageGetOutput (const std::string &messageName)
 return the output with name messageName of the filter
 
DataObjectPointerArraySizeType GetOutputIndex (std::string messageName)
 return the index of the output with name messageName, -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 IGTLMessageSource 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.
 
void SetFPS (unsigned int fps)
 Sets the fps used for streaming this source.
 
unsigned int GetFPS ()
 Gets the fps used for streaming this source.
 

Protected Member Functions

 NavigationDataToIGTLMessageFilter ()
 
 ~NavigationDataToIGTLMessageFilter () override
 
virtual void GenerateDataModeSendQTDataMsg ()
 Generates the output.
 
virtual void GenerateDataModeSendTDataMsg ()
 Generates the output for ModeSendTDataMsg.
 
virtual void GenerateDataModeSendQTransMsg ()
 Generates the output for ModeSendQTransMsg.
 
virtual void GenerateDataModeSendTransMsg ()
 Generates the output for ModeSendTransMsg.
 
virtual void CreateOutputsForAllInputs ()
 create output objects according to OperationMode for all inputs
 
igtl::TimeStamp::Pointer ConvertToIGTLTimeStamp (double IGTTimeStamp)
 
- Protected Member Functions inherited from mitk::IGTLMessageSource
 IGTLMessageSource ()
 
 ~IGTLMessageSource () override
 

Protected Attributes

OperationMode m_OperationMode
 Stores the mode. See enum OperationMode.
 
unsigned int m_CurrentTimeStep
 Indicates the current timestamp.
 
- Protected Attributes inherited from mitk::IGTLMessageSource
std::string m_Name
 
std::string m_Type
 
std::mutex m_StreamingFPSMutex
 
unsigned int m_StreamingFPS
 
us::ServiceRegistration< Self > m_ServiceRegistration
 

Additional Inherited Members

- Static Public Attributes inherited from mitk::IGTLMessageSource
static const std::string US_INTERFACE_NAME
 These Constants are used in conjunction with Microservices.
 
static const std::string US_PROPKEY_DEVICENAME
 
static const std::string US_PROPKEY_DEVICETYPE
 
static const std::string US_PROPKEY_ID
 
static const std::string US_PROPKEY_ISACTIVE
 

Detailed Description

This filter creates IGTL messages from mitk::NavigaitionData objects.

Documentation

Definition at line 31 of file mitkNavigationDataToIGTLMessageFilter.h.

Member Enumeration Documentation

◆ OperationMode

There are four different operation modes.

Documentation

  • ModeSendQTransMsg: every input NavigationData is processed into one output message that contains a position and a orientation (quaternion).
  • ModeSendTransMsg: every input NavigationData is processed into one output message that contains a 4x4 transformation.
  • ModeSendQTDataMsg:all input NavigationData is processed into one single output message that contains a position and orientation (quaternion) for each navigation data.
  • ModeSendTDataMsg:all input NavigationData is processed into one single output message that contains a 4x4 transformation for each navigation data.
Enumerator
ModeSendQTransMsg 
ModeSendTransMsg 
ModeSendQTDataMsg 
ModeSendTDataMsg 

Definition at line 52 of file mitkNavigationDataToIGTLMessageFilter.h.

Constructor & Destructor Documentation

◆ NavigationDataToIGTLMessageFilter()

mitk::NavigationDataToIGTLMessageFilter::NavigationDataToIGTLMessageFilter ( )
protected

Definition at line 23 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ ~NavigationDataToIGTLMessageFilter()

mitk::NavigationDataToIGTLMessageFilter::~NavigationDataToIGTLMessageFilter ( )
overrideprotected

Definition at line 36 of file mitkNavigationDataToIGTLMessageFilter.cpp.

Member Function Documentation

◆ ConnectTo()

void mitk::NavigationDataToIGTLMessageFilter::ConnectTo ( mitk::NavigationDataSource * UpstreamFilter)
virtual

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

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

Definition at line 311 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ ConvertToIGTLTimeStamp()

igtl::TimeStamp::Pointer mitk::NavigationDataToIGTLMessageFilter::ConvertToIGTLTimeStamp ( double IGTTimeStamp)
protected

Converts a mitk::IGTTimestamp (double, milliseconds) to an OpenIGTLink timestamp

Definition at line 218 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ CreateOutputsForAllInputs()

void mitk::NavigationDataToIGTLMessageFilter::CreateOutputsForAllInputs ( )
protectedvirtual

create output objects according to OperationMode for all inputs

Definition at line 89 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ GenerateData()

void mitk::NavigationDataToIGTLMessageFilter::GenerateData ( )
override

filter execute method

Definition at line 40 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ GenerateDataModeSendQTDataMsg()

void mitk::NavigationDataToIGTLMessageFilter::GenerateDataModeSendQTDataMsg ( )
protectedvirtual

Generates the output.

Generates the output for ModeSendQTDataMsg

Definition at line 225 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ GenerateDataModeSendQTransMsg()

void mitk::NavigationDataToIGTLMessageFilter::GenerateDataModeSendQTransMsg ( )
protectedvirtual

Generates the output for ModeSendQTransMsg.

Definition at line 153 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ GenerateDataModeSendTDataMsg()

void mitk::NavigationDataToIGTLMessageFilter::GenerateDataModeSendTDataMsg ( )
protectedvirtual

Generates the output for ModeSendTDataMsg.

Definition at line 264 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ GenerateDataModeSendTransMsg()

void mitk::NavigationDataToIGTLMessageFilter::GenerateDataModeSendTransMsg ( )
protectedvirtual

Generates the output for ModeSendTransMsg.

Definition at line 184 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ GenerateOutputInformation()

void mitk::NavigationDataToIGTLMessageFilter::GenerateOutputInformation ( )
inlineoverride

empty implementation to prevent calling of the superclass method that would try to copy information from the input NavigationData to the output PointSet, which makes no sense!

Definition at line 109 of file mitkNavigationDataToIGTLMessageFilter.h.

◆ GetInput() [1/2]

const mitk::NavigationData * mitk::NavigationDataToIGTLMessageFilter::GetInput ( void )

Returns the input of this filter.

Definition at line 75 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ GetInput() [2/2]

const mitk::NavigationData * mitk::NavigationDataToIGTLMessageFilter::GetInput ( unsigned int idx)

Returns the input number idx of this filter.

Definition at line 82 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ itkCloneMacro()

mitk::NavigationDataToIGTLMessageFilter::itkCloneMacro ( Self )

◆ itkFactorylessNewMacro()

mitk::NavigationDataToIGTLMessageFilter::itkFactorylessNewMacro ( Self )

◆ itkGetConstMacro()

mitk::NavigationDataToIGTLMessageFilter::itkGetConstMacro ( OperationMode ,
OperationMode  )

returns the mode of this filter.

See OperationMode for the behavior in the different modes

◆ mitkClassMacro()

mitk::NavigationDataToIGTLMessageFilter::mitkClassMacro ( NavigationDataToIGTLMessageFilter ,
IGTLMessageSource  )

◆ SetInput() [1/2]

void mitk::NavigationDataToIGTLMessageFilter::SetInput ( const mitk::NavigationData * NavigationData)
virtual

Sets one input NavigationData.

Definition at line 61 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ SetInput() [2/2]

void mitk::NavigationDataToIGTLMessageFilter::SetInput ( unsigned int idx,
const NavigationData * nd )
virtual

Sets the input NavigationData at a specific index.

Definition at line 68 of file mitkNavigationDataToIGTLMessageFilter.cpp.

◆ SetOperationMode()

void mitk::NavigationDataToIGTLMessageFilter::SetOperationMode ( OperationMode mode)
virtual

Sets the mode of this filter.

See OperationMode for the behavior in the different modes

Warning
A call to this method will change the number of outputs of the filter. After calling this method, all previously acquired pointers to outputs are invalid Always set the operation mode first, then get the outputs with GetOutput()

Definition at line 305 of file mitkNavigationDataToIGTLMessageFilter.cpp.

Member Data Documentation

◆ m_CurrentTimeStep

unsigned int mitk::NavigationDataToIGTLMessageFilter::m_CurrentTimeStep
protected

Indicates the current timestamp.

Definition at line 160 of file mitkNavigationDataToIGTLMessageFilter.h.

◆ m_OperationMode

OperationMode mitk::NavigationDataToIGTLMessageFilter::m_OperationMode
protected

Stores the mode. See enum OperationMode.

Definition at line 158 of file mitkNavigationDataToIGTLMessageFilter.h.


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