Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
itkVtkAbstractTransform.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef itkVtkAbstractTransform_h
14 #define itkVtkAbstractTransform_h
15 
16 #include <itkTransform.h>
17 #include <MitkCoreExports.h>
18 
19 class vtkAbstractTransform;
20 
21 namespace itk
22 {
30  template <class TScalarType>
31  class VtkAbstractTransform : public itk::Transform<TScalarType, 3, 3>
32  {
33  public:
35  typedef Transform<TScalarType, 3, 3> Superclass;
38  typedef typename Superclass::OutputPointType OutputPointType;
39  typedef typename Superclass::OutputVectorType OutputVectorType;
40  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
41  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
42  typedef typename Superclass::InputPointType InputPointType;
43  typedef typename Superclass::InputVectorType InputVectorType;
44  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
45  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
46  typedef typename Superclass::ParametersType ParametersType;
47  typedef typename Superclass::JacobianType JacobianType;
48  typedef typename Superclass::JacobianPositionType JacobianPositionType;
49 
50  itkFactorylessNewMacro(Self);
51 
52  itkCloneMacro(Self);
53 
55  virtual vtkAbstractTransform *GetVtkAbstractTransform() const;
56 
58  virtual vtkAbstractTransform *GetInverseVtkAbstractTransform() const;
59 
67  virtual void SetVtkAbstractTransform(vtkAbstractTransform *aVtkAbstractTransform);
68 
69  using Superclass::TransformVector;
70  using Superclass::TransformCovariantVector;
71 
74 
77 
80 
83 
88  virtual InputPointType BackTransform(const OutputPointType &point) const;
89 
94  virtual InputVectorType BackTransform(const OutputVectorType &vector) const;
95 
101 
107 
109  void SetParameters(const ParametersType &) override;
110 
112  void SetFixedParameters(const ParametersType &) override;
113 
116 
119 
121  itk::ModifiedTimeType GetMTime() const override;
122 
123  protected:
126 
129 
131  vtkAbstractTransform *m_VtkAbstractTransform;
132 
134  vtkAbstractTransform *m_InverseVtkAbstractTransform;
135 
136  mutable unsigned long m_LastVtkAbstractTransformTimeStamp;
137  };
138 
139 } // namespace itk
140 
141 #ifndef MITK_MANUAL_INSTANTIATION
142 #include <itkVtkAbstractTransform.tpp>
143 #endif
144 
145 #endif /* itkVtkAbstractTransform_h */
Adapter from vtkAbstractTransform to itk::Transform<TScalarType, 3, 3>.
SmartPointer< const Self > ConstPointer
void SetFixedParameters(const ParametersType &) override
Set the fixed transform parameters (not yet implemented).
vtkAbstractTransform * m_VtkAbstractTransform
The forward vtkAbstractTransform instance.
void ComputeJacobianWithRespectToPosition(const InputPointType &, JacobianPositionType &) const override
Compute the Jacobian with respect to position (not yet implemented).
OutputVectorType TransformVector(const InputVectorType &) const override
Transform a vector from input space to output space using the VTK transform.
~VtkAbstractTransform() override
Destructor. Unregisters the owned VTK transform.
Superclass::OutputVnlVectorType OutputVnlVectorType
virtual InputCovariantVectorType BackTransform(const OutputCovariantVectorType &vector) const
Back-transform a covariant vector (not yet implemented, will throw).
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override
Transform a covariant vector (not yet implemented, will throw).
virtual vtkAbstractTransform * GetVtkAbstractTransform() const
Get the vtkAbstractTransform (stored in m_VtkAbstractTransform).
OutputPointType TransformPoint(const InputPointType &) const override
Transform a point from input space to output space using the VTK transform.
Superclass::JacobianPositionType JacobianPositionType
Transform< TScalarType, 3, 3 > Superclass
unsigned long m_LastVtkAbstractTransformTimeStamp
Superclass::OutputVectorType OutputVectorType
virtual InputVnlVectorType BackTransform(const OutputVnlVectorType &vector) const
Back-transform a vnl vector from output space to input space using the inverse VTK transform.
Superclass::ParametersType ParametersType
Superclass::InputVnlVectorType InputVnlVectorType
virtual InputPointType BackTransform(const OutputPointType &point) const
Back-transform a point from output space to input space using the inverse VTK transform.
Superclass::InputCovariantVectorType InputCovariantVectorType
vtkAbstractTransform * m_InverseVtkAbstractTransform
The inverse vtkAbstractTransform instance (managed by m_VtkAbstractTransform).
OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override
Transform a vnl vector from input space to output space using the VTK transform.
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::OutputPointType OutputPointType
virtual vtkAbstractTransform * GetInverseVtkAbstractTransform() const
Get the inverse vtkAbstractTransform (stored in m_InverseVtkAbstractTransform).
void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const override
Compute the Jacobian with respect to parameters (not yet implemented).
virtual InputVectorType BackTransform(const OutputVectorType &vector) const
Back-transform a vector from output space to input space using the inverse VTK transform.
VtkAbstractTransform()
Default constructor. Initializes transforms to nullptr.
Superclass::JacobianType JacobianType
Superclass::InputVectorType InputVectorType
Superclass::InputPointType InputPointType
void SetParameters(const ParametersType &) override
Set the transform parameters (not yet implemented).
itk::ModifiedTimeType GetMTime() const override
Get the modification time, taking VTK transform changes into account.
virtual void SetVtkAbstractTransform(vtkAbstractTransform *aVtkAbstractTransform)
Set the vtkAbstractTransform (stored in m_VtkAbstractTransform).