19 m_RepresentationList(), m_TransformPosition(), m_TransformOrientation(), m_RotationMode(RotationStandard)
43 OffsetPointerMap::const_iterator iter =
m_OffsetList.find(index);
70 DataObjectPointerArray inputs = this->GetInputs();
71 for (
unsigned int index=0; index < inputs.size(); index++)
90 MITK_WARN <<
"No BaseData associated with input " << index;
96 if (affineTransform.IsNull())
98 MITK_WARN <<
"AffineTransform IndexToWorldTransform not initialized!";
112 affineTransform->SetIdentity();
120 static AffineTransform3D::MatrixType m;
126 static itk::QuaternionRigidTransform<double>::Pointer quatTransform = itk::QuaternionRigidTransform<double>::New();
128 vnl_quaternion<double> doubleQuaternion(orientation.x(), orientation.y(), orientation.z(), orientation.r());
129 quatTransform->SetIdentity();
130 quatTransform->SetRotation(doubleQuaternion);
131 quatTransform->Modified();
137 vnl_matrix_fixed<mitk::ScalarType,3,3> rot = orientation.rotation_matrix_transpose();
138 for(
int i=0; i<3; i++)
for (
int j=0; j<3; j++) m[i][j] = rot[i][j];
140 affineTransform->SetMatrix(m);
147 pos.SetVnlVector(nd->
GetPosition().GetVnlVector());
148 affineTransform->SetOffset(pos);
150 affineTransform->Modified();
154 if(offset.IsNotNull())
156 mitk::AffineTransform3D::Pointer overallTransform = mitk::AffineTransform3D::New();
157 overallTransform->SetIdentity();
158 overallTransform->Compose(offset);
159 overallTransform->Compose(affineTransform);
178 itkDebugMacro(
"setting TransformPosition for index " << index <<
" to " << applyTransform);
190 itkDebugMacro(
"returning TransformPosition for index " << index);
213 itkDebugMacro(
"setting TransformOrientation for index " << index <<
" to " << applyTransform);
225 itkDebugMacro(
"returning TransformOrientation for index " << index);
void SetSpacing(const mitk::Vector3D &aSpacing, bool enforceSetSpacing=false)
Set the spacing (m_Spacing).
NavigationData * GetOutput(void)
return the output (output with id 0) of the filter
void SetIndexToWorldTransform(mitk::AffineTransform3D *transform)
Base of all data objects.
void SetRepresentationObject(unsigned int index, BaseData *data)
Set the representation object of the input.
virtual void SetTransformOrientation(unsigned int index, bool applyTransform)
if set to true, the filter will use the orientation part of the input navigation data at the given in...
virtual void TransformOrientationOn(unsigned int index)
sets the TransformOrientation flag to true for the given index
NavigationDataToNavigationDataFilter is the base class of all filters that receive NavigationDatas as...
BooleanInputMap m_TransformPosition
if set to true, the filter will use the position part of the input navigation data at the given index...
BaseData::ConstPointer RepresentationPointer
Smart Pointer type to a BaseData.
virtual void SetDataValid(bool _arg)
sets the dataValid flag of the NavigationData object indicating if the object contains valid data ...
OffsetPointerMap m_OffsetList
mitk::Quaternion OrientationType
Type that holds the orientation part of the tracking data.
virtual PositionType GetPosition() const
returns position of the NavigationData object
const NavigationData * GetInput(void) const
Get the input of this filter.
virtual void TransformPositionOff(unsigned int index)
sets the TransformPosition flag to false for the given index
virtual bool GetTransformPosition(unsigned int index) const
returns whether position part of the input navigation data at the given index is used for the transfo...
mitk::AffineTransform3D::Pointer GetOffset(int index)
NavigationDataObjectVisualizationFilter()
Constructor.
const BaseData * GetRepresentationObject(unsigned int idx)
Get the representation object associated with the index idx.
void Modified() const override
Overload of function Modified() to prohibit several calls of Modified() using the ModifiedLock class...
BooleanInputMap m_TransformOrientation
if set to true, the filter will use the orientation part of the input navigation data at the given in...
virtual void TransformOrientationOff(unsigned int index)
sets the TransformOrientation flag to false for the given index
RepresentationPointerMap m_RepresentationList
An array of the BaseData which represent the tools.
void TransferMatrix(const itk::Matrix< U, NRows, NColumns > &in, itk::Matrix< V, NRows, NColumns > &out)
virtual void SetRotationMode(RotationMode r)
void Graft(const DataObject *data) override
Graft the data and information from one NavigationData to another.
void GenerateData() override
virtual void SetTransformPosition(unsigned int index, bool applyTransform)
if set to true, the filter will use the position part of the input navigation data at the given index...
const mitk::Vector3D GetSpacing() const
Get the spacing (size of a pixel).
virtual bool GetTransformOrientation(unsigned int index) const
returns whether orientation part of the input navigation data at the given index is used for the tran...
virtual void TransformPositionOn(unsigned int index)
sets the TransformPosition flag to true for the given index
virtual OrientationType GetOrientation() const
returns the orientation of the NavigationData object
void SetOffset(int index, mitk::AffineTransform3D::Pointer offset)
Defines an offset for a representation object. This offset is applied before the object is visualized...
virtual bool IsDataValid() const
returns true if the object contains valid data
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
~NavigationDataObjectVisualizationFilter() override
Destructor.
mitk::AffineTransform3D * GetIndexToWorldTransform()
Get the transformation used to convert from index to world coordinates.