|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Helper class that manages transform-related variables for geometries. More...
#include <mitkGeometryTransformHolder.h>
Public Types | |
| typedef itk::ScalableAffineTransform< ScalarType, 3 > | TransformType |
Public Member Functions | |
| GeometryTransformHolder () | |
| Default constructor. More... | |
| GeometryTransformHolder (const GeometryTransformHolder &other) | |
| Copy constructor. More... | |
| virtual | ~GeometryTransformHolder () |
| Destructor. More... | |
| void | Initialize () |
| Initialize the transform to default values. More... | |
| void | Initialize (const GeometryTransformHolder *other) |
| Initialize this transform holder from another instance. More... | |
| Point3D | GetOrigin () const |
| Get the origin, e.g. the upper-left corner of the plane. More... | |
| void | SetOrigin (const Point3D &origin) |
| Set the origin, i.e. the upper-left corner of the plane. More... | |
| mitk::Vector3D | GetSpacing () const |
| Get the spacing (size of a pixel). More... | |
| void | SetSpacing (const mitk::Vector3D &aSpacing, bool enforceSetSpacing=false) |
| Set the spacing. More... | |
| mitk::AffineTransform3D * | GetIndexToWorldTransform () |
| Get the transformation used to convert from index to world coordinates. More... | |
| const mitk::AffineTransform3D * | GetIndexToWorldTransform () const |
| Get the transformation used to convert from index to world coordinates (const version). More... | |
| void | SetIndexToWorldTransform (mitk::AffineTransform3D *transform) |
| Set the transformation used to convert from index to world coordinates. More... | |
| virtual void | SetIndexToWorldTransformByVtkMatrix (vtkMatrix4x4 *vtkmatrix) |
| Set the ITK transform (m_IndexToWorldTransform) via a vtkMatrix4x4. More... | |
| void | SetIndexToWorldTransformWithoutChangingSpacing (mitk::AffineTransform3D *transform) |
| Set the transformation used to convert from index to world coordinates, keeping original spacing. More... | |
| void | SetIndexToWorldTransformByVtkMatrixWithoutChangingSpacing (vtkMatrix4x4 *vtkmatrix) |
| Set the ITK transform via a vtkMatrix4x4, keeping original spacing. More... | |
| vtkMatrix4x4 * | GetVtkMatrix () |
| Get the VTK matrix which describes the transform. More... | |
| const vtkMatrix4x4 * | GetVtkMatrix () const |
| Get the VTK matrix which describes the transform (const version). More... | |
| vtkLinearTransform * | GetVtkTransform () const |
| Get the index-to-world transform as a vtkLinearTransform. More... | |
| void | SetMatrix (Matrix3D &matrix) |
| Set the rotation/scaling matrix. More... | |
| void | SetIdentity () |
| Set the transform to identity. More... | |
| void | Compose (const TransformType *other, bool pre=false) |
| Compose with another transform. More... | |
| void | SetVtkMatrixDeepCopy (vtkTransform *vtktransform) |
| Deep-copy a vtkTransform into the internal VTK matrix. More... | |
| bool | IsIndexToWorldTransformNull () |
| Check whether the IndexToWorldTransform is null. More... | |
| AffineTransform3D::MatrixType::InternalMatrixType | GetVnlMatrix () |
| Get the VNL matrix representation of the transform. More... | |
Helper class that manages transform-related variables for geometries.
GeometryTransformHolder keeps all information about the transform (e.g. spacing, offset, transformation matrices) in consistent states. It provides getters and setters to all transformation-related information. Implementation is hidden and may be subject to changes.
Definition at line 37 of file mitkGeometryTransformHolder.h.
| typedef itk::ScalableAffineTransform<ScalarType, 3> mitk::GeometryTransformHolder::TransformType |
Definition at line 69 of file mitkGeometryTransformHolder.h.
| mitk::GeometryTransformHolder::GeometryTransformHolder | ( | ) |
Default constructor.
| mitk::GeometryTransformHolder::GeometryTransformHolder | ( | const GeometryTransformHolder & | other | ) |
Copy constructor.
| other | The GeometryTransformHolder to copy from. |
|
virtual |
Destructor.
| void mitk::GeometryTransformHolder::Compose | ( | const TransformType * | other, |
| bool | pre = false |
||
| ) |
Compose with another transform.
| other | The transform to compose with. |
| pre | If true, the other transform is applied before this one; if false, after. |
| mitk::AffineTransform3D* mitk::GeometryTransformHolder::GetIndexToWorldTransform | ( | ) |
Get the transformation used to convert from index to world coordinates.
| const mitk::AffineTransform3D* mitk::GeometryTransformHolder::GetIndexToWorldTransform | ( | ) | const |
Get the transformation used to convert from index to world coordinates (const version).
| Point3D mitk::GeometryTransformHolder::GetOrigin | ( | ) | const |
Get the origin, e.g. the upper-left corner of the plane.
| mitk::Vector3D mitk::GeometryTransformHolder::GetSpacing | ( | ) | const |
Get the spacing (size of a pixel).
| AffineTransform3D::MatrixType::InternalMatrixType mitk::GeometryTransformHolder::GetVnlMatrix | ( | ) |
Get the VNL matrix representation of the transform.
| vtkMatrix4x4* mitk::GeometryTransformHolder::GetVtkMatrix | ( | ) |
Get the VTK matrix which describes the transform.
| const vtkMatrix4x4* mitk::GeometryTransformHolder::GetVtkMatrix | ( | ) | const |
Get the VTK matrix which describes the transform (const version).
| vtkLinearTransform* mitk::GeometryTransformHolder::GetVtkTransform | ( | ) | const |
Get the index-to-world transform as a vtkLinearTransform.
| void mitk::GeometryTransformHolder::Initialize | ( | ) |
Initialize the transform to default values.
| void mitk::GeometryTransformHolder::Initialize | ( | const GeometryTransformHolder * | other | ) |
Initialize this transform holder from another instance.
| other | The GeometryTransformHolder to initialize from. |
| bool mitk::GeometryTransformHolder::IsIndexToWorldTransformNull | ( | ) |
Check whether the IndexToWorldTransform is null.
true if the transform is null, false otherwise. | void mitk::GeometryTransformHolder::SetIdentity | ( | ) |
Set the transform to identity.
| void mitk::GeometryTransformHolder::SetIndexToWorldTransform | ( | mitk::AffineTransform3D * | transform | ) |
Set the transformation used to convert from index to world coordinates.
This will also change the spacing.
| transform | The AffineTransform3D to set. |
|
virtual |
Set the ITK transform (m_IndexToWorldTransform) via a vtkMatrix4x4.
Convenience method. This will also change the spacing.
| vtkmatrix | The vtkMatrix4x4 to set the transform from. |
| void mitk::GeometryTransformHolder::SetIndexToWorldTransformByVtkMatrixWithoutChangingSpacing | ( | vtkMatrix4x4 * | vtkmatrix | ) |
Set the ITK transform via a vtkMatrix4x4, keeping original spacing.
Convenience method.
| vtkmatrix | The vtkMatrix4x4 to set the transform from. |
| void mitk::GeometryTransformHolder::SetIndexToWorldTransformWithoutChangingSpacing | ( | mitk::AffineTransform3D * | transform | ) |
Set the transformation used to convert from index to world coordinates, keeping original spacing.
| transform | The AffineTransform3D to set. |
| void mitk::GeometryTransformHolder::SetMatrix | ( | Matrix3D & | matrix | ) |
Set the rotation/scaling matrix.
| matrix | The 3x3 matrix to set. |
| void mitk::GeometryTransformHolder::SetOrigin | ( | const Point3D & | origin | ) |
Set the origin, i.e. the upper-left corner of the plane.
| origin | The origin point in world coordinates. |
| void mitk::GeometryTransformHolder::SetSpacing | ( | const mitk::Vector3D & | aSpacing, |
| bool | enforceSetSpacing = false |
||
| ) |
Set the spacing.
The spacing is also changed in the IndexToWorldTransform.
| aSpacing | The spacing to set as a 3D vector. |
| enforceSetSpacing | If true, spacing is set even when the transform suggests otherwise. |
| void mitk::GeometryTransformHolder::SetVtkMatrixDeepCopy | ( | vtkTransform * | vtktransform | ) |
Deep-copy a vtkTransform into the internal VTK matrix.
| vtktransform | The vtkTransform to copy from. |