Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::NodeDisplacementFilter Class Reference

This filter moves DataNodes relatively to tracking Data from a 6-DoF Sensor. More...

#include <mitkNodeDisplacementFilter.h>

Inheritance diagram for mitk::NodeDisplacementFilter:
Collaboration diagram for mitk::NodeDisplacementFilter:

Public Member Functions

 mitkClassMacro (NodeDisplacementFilter, NavigationDataPassThroughFilter)
 
bool AddNode (mitk::DataNode::Pointer node)
 Adds a node to the filter. The position of which will then be continously update relatively to the selected input stream. More...
 
bool RemoveNode (unsigned int i)
 Removes a node from the filter. More...
 
virtual int GetNumberOfNodes ()
 Returns the number of nodes that were added to this filter. More...
 
virtual mitk::DataNode::Pointer GetNode (unsigned int i=0)
 Returns the nth node that was added to this filter. More...
 
virtual mitk::NavigationData::Pointer GetRawDisplacementNavigationData (unsigned int i=0)
 
virtual std::vector< mitk::DataNode::PointerGetNodes ()
 Returns a vector containing all nodes that have been added to this filter. More...
 
virtual void SelectInput (int i)
 Selects an input stream as the reference stream. More...
 
virtual void SetInitialReferencePose (mitk::NavigationData::Pointer _arg)
 
virtual void ResetNodes ()
 Removes all added Nodes from the Filter but leaves all other configuration intact. More...
 
- Public Member Functions inherited from mitk::NavigationDataPassThroughFilter
 mitkClassMacro (NavigationDataPassThroughFilter, NavigationDataToNavigationDataFilter) static Pointer New()
 
- Public Member Functions inherited from mitk::NavigationDataToNavigationDataFilter
 mitkClassMacro (NavigationDataToNavigationDataFilter, NavigationDataSource)
 
virtual void SetInput (const NavigationData *nd)
 Set the input of this filter. More...
 
virtual void SetInput (unsigned int idx, const NavigationData *nd)
 Set input with id idx of this filter. More...
 
const NavigationDataGetInput (void) const
 Get the input of this filter. More...
 
const NavigationDataGetInput (unsigned int idx) const
 Get the input with id idx of this filter. More...
 
const NavigationDataGetInput (std::string navDataName) const
 Get the input with name navDataName of this filter. More...
 
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 More...
 
virtual void ConnectTo (mitk::NavigationDataSource *UpstreamFilter)
 Connects the input of this filter to the outputs of the given NavigationDataSource. More...
 
- Public Member Functions inherited from mitk::NavigationDataSource
 mitkClassMacroItkParent (NavigationDataSource, itk::ProcessObject)
 
virtual std::string GetName ()
 
virtual void SetName (std::string _arg)
 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. More...
 
NavigationDataGetOutput (void)
 return the output (output with id 0) of the filter More...
 
NavigationDataGetOutput (DataObjectPointerArraySizeType idx)
 return the output with id idx of the filter More...
 
NavigationDataGetOutput (const std::string &navDataName)
 return the output with name navDataName of the filter More...
 
DataObjectPointerArraySizeType GetOutputIndex (std::string navDataName)
 return the index of the output with name navDataName, -1 if no output with that name was found More...
 
virtual void RegisterAsMicroservice ()
 Registers this object as a Microservice, making it available to every module and/or plugin. To unregister, call UnregisterMicroservice(). More...
 
virtual void UnRegisterMicroservice ()
 Registers this object as a Microservice, making it available to every module and/or plugin. More...
 
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(). More...
 
virtual void GraftNthOutput (unsigned int idx, itk::DataObject *graft)
 Graft the specified DataObject onto this ProcessObject's output. More...
 
virtual void GraftOutput (itk::DataObject *graft)
 Graft the specified DataObject onto this ProcessObject's output. More...
 
virtual itk::DataObject::Pointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
virtual itk::DataObject::Pointer MakeOutput (const DataObjectIdentifierType &name) override
 
virtual void SetParameters (const mitk::PropertyList *)
 Set all filter parameters as the PropertyList p. More...
 
virtual mitk::PropertyList::ConstPointer GetParameters () const
 Get all filter parameters as a PropertyList. More...
 
virtual void Freeze ()
 
virtual void UnFreeze ()
 
virtual bool GetIsFrozen ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 NodeDisplacementFilter ()
 
virtual ~NodeDisplacementFilter ()
 
virtual void GenerateData () override
 Passes navigation data from all inputs to all outputs. If a subclass wants to implement its own version of the GenerateData() method it should call this method inside its implementation. More...
 
mitk::Geometry3D::Pointer TransformToGeometry (mitk::AffineTransform3D::Pointer transform)
 Creates an Geometry 3D Object from an AffineTransformation. More...
 
- Protected Member Functions inherited from mitk::NavigationDataPassThroughFilter
 NavigationDataPassThroughFilter ()
 
virtual ~NavigationDataPassThroughFilter ()
 
- Protected Member Functions inherited from mitk::NavigationDataToNavigationDataFilter
 NavigationDataToNavigationDataFilter ()
 
virtual ~NavigationDataToNavigationDataFilter ()
 
void CreateOutputsForAllInputs ()
 Create an output for each input. More...
 
- Protected Member Functions inherited from mitk::NavigationDataSource
 NavigationDataSource ()
 
virtual ~NavigationDataSource ()
 

Protected Attributes

std::vector< mitk::DataNode::Pointerm_Nodes
 All Nodes that are being managed by this Filter. More...
 
std::vector< mitk::AffineTransform3D::Pointer > m_Transforms
 The transformation that each node has to be reached from the selected navigation tool. The indexes correspond to indexes in the node vector. More...
 
int m_SelectedInput
 The Input that is used as a reference to orient the managed nodes. More...
 
mitk::NavigationData::Pointer m_InitialReferencePose
 
- Protected Attributes inherited from mitk::NavigationDataSource
std::string m_Name
 
bool m_IsFrozen
 

Additional Inherited Members

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

Detailed Description

This filter moves DataNodes relatively to tracking Data from a 6-DoF Sensor.

Documentation This behaviour can for example be used for rigid tracking of risk structures relative to a skin marker. To use it, connect the Filter and select the input that delivers tracking data from the reference marker via SelectInput(). Make sure tracking is started before proceeding any further: The filter requires tracking data from the sensor to calculate the relative position of the added node.

One can then add Nodes to the filter via AddNode(). Make sure that the node has a geometry and position set in the tracking coordinate system of the reference input. The Filter will then calculate the offset between Node and reference marker and continously update the node position accordign to the tracking data.

Definition at line 47 of file mitkNodeDisplacementFilter.h.

Constructor & Destructor Documentation

mitk::NodeDisplacementFilter::NodeDisplacementFilter ( )
protected

Definition at line 21 of file mitkNodeDisplacementFilter.cpp.

mitk::NodeDisplacementFilter::~NodeDisplacementFilter ( )
protectedvirtual

Definition at line 26 of file mitkNodeDisplacementFilter.cpp.

Member Function Documentation

bool mitk::NodeDisplacementFilter::AddNode ( mitk::DataNode::Pointer  node)

Adds a node to the filter. The position of which will then be continously update relatively to the selected input stream.

The node should have a geometry and position set in the coordinate system of the selected input stream

Definition at line 30 of file mitkNodeDisplacementFilter.cpp.

References MITK_ERROR, MITK_WARN, mitkThrow, mitk::New(), and Update().

void mitk::NodeDisplacementFilter::GenerateData ( )
overrideprotectedvirtual

Passes navigation data from all inputs to all outputs. If a subclass wants to implement its own version of the GenerateData() method it should call this method inside its implementation.

Reimplemented from mitk::NavigationDataPassThroughFilter.

Definition at line 143 of file mitkNodeDisplacementFilter.cpp.

References mitk::NavigationDataPassThroughFilter::GenerateData(), and MITK_INFO.

mitk::DataNode::Pointer mitk::NodeDisplacementFilter::GetNode ( unsigned int  i = 0)
virtual

Returns the nth node that was added to this filter.

Definition at line 96 of file mitkNodeDisplacementFilter.cpp.

std::vector< mitk::DataNode::Pointer > mitk::NodeDisplacementFilter::GetNodes ( )
virtual

Returns a vector containing all nodes that have been added to this filter.

Indexes in this vector correspond to indexes in the vector provided by GetOffsets().

Definition at line 102 of file mitkNodeDisplacementFilter.cpp.

int mitk::NodeDisplacementFilter::GetNumberOfNodes ( )
virtual

Returns the number of nodes that were added to this filter.

Definition at line 91 of file mitkNodeDisplacementFilter.cpp.

mitk::NavigationData::Pointer mitk::NodeDisplacementFilter::GetRawDisplacementNavigationData ( unsigned int  i = 0)
virtual
Returns
Returns the current pose in world coordinates of node i as raw navigation data.

Definition at line 119 of file mitkNodeDisplacementFilter.cpp.

References MITK_WARN, and mitk::NavigationData::New().

mitk::NodeDisplacementFilter::mitkClassMacro ( NodeDisplacementFilter  ,
NavigationDataPassThroughFilter   
)
static Pointer mitk::NodeDisplacementFilter::New ( )
static
bool mitk::NodeDisplacementFilter::RemoveNode ( unsigned int  i)

Removes a node from the filter.

Parameters
iindex of the node, the index corresponds to the order in which the nodes where added by AddNode()
Returns
true if a node with the given index was removed, false if the index was greater or equal the number of nodes in the filter

Definition at line 82 of file mitkNodeDisplacementFilter.cpp.

void mitk::NodeDisplacementFilter::ResetNodes ( )
virtual

Removes all added Nodes from the Filter but leaves all other configuration intact.

Documentation

Definition at line 177 of file mitkNodeDisplacementFilter.cpp.

void mitk::NodeDisplacementFilter::SelectInput ( int  i)
virtual

Selects an input stream as the reference stream.

Position and orientation of all Nodes will be Updated according to information from the selected stream. Make sure to select the input before adding nodes. The input should deliver 6DoF Data. Behaviour is undefined for 5-Dof Data. The selected input can be changed during intervention if both old and new reference input Lie in the same coordinate system. Be aware however that the offsets will not be recalculated, just moved to the new stream.

Definition at line 107 of file mitkNodeDisplacementFilter.cpp.

References MITK_ERROR, and mitkThrow.

virtual void mitk::NodeDisplacementFilter::SetInitialReferencePose ( mitk::NavigationData::Pointer  _arg)
virtual

Manually sets the initial marker pose which is used for computing the offset. By default this option is disabled and the current pose of the selected input is used to compute the offset. However, sometimes it is needed to give a defined marker pose, then this method can be used. To disable the option you can set MarkerPosition to NULL.

mitk::Geometry3D::Pointer mitk::NodeDisplacementFilter::TransformToGeometry ( mitk::AffineTransform3D::Pointer  transform)
protected

Creates an Geometry 3D Object from an AffineTransformation.

Definition at line 183 of file mitkNodeDisplacementFilter.cpp.

References mitk::Geometry3D::New().

Member Data Documentation

mitk::NavigationData::Pointer mitk::NodeDisplacementFilter::m_InitialReferencePose
protected

Reference pose of the selected input to compute the offset. If this is NULL the current pose of the selected input is used instead.

Definition at line 141 of file mitkNodeDisplacementFilter.h.

std::vector<mitk::DataNode::Pointer> mitk::NodeDisplacementFilter::m_Nodes
protected

All Nodes that are being managed by this Filter.

Definition at line 125 of file mitkNodeDisplacementFilter.h.

int mitk::NodeDisplacementFilter::m_SelectedInput
protected

The Input that is used as a reference to orient the managed nodes.

Definition at line 136 of file mitkNodeDisplacementFilter.h.

std::vector<mitk::AffineTransform3D::Pointer> mitk::NodeDisplacementFilter::m_Transforms
protected

The transformation that each node has to be reached from the selected navigation tool. The indexes correspond to indexes in the node vector.

Definition at line 131 of file mitkNodeDisplacementFilter.h.


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