Medical Imaging Interaction Toolkit  2022.04.99-2e1e005b
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 MITKVTKABSTRACTTRANSFORM_H_HEADER_INCLUDED_C1C68A2C
14 #define MITKVTKABSTRACTTRANSFORM_H_HEADER_INCLUDED_C1C68A2C
15 
16 #include "itkTransform.h"
17 #include <MitkCoreExports.h>
18 
19 class vtkAbstractTransform;
20 
21 namespace itk
22 {
23  //##Documentation
24  //## @brief Adapter from vtkAbstractTransform to itk::Transform<TScalarType, 3, 3>
25  //## @ingroup Geometry
26  template <class TScalarType>
27  class VtkAbstractTransform : public itk::Transform<TScalarType, 3, 3>
28  {
29  public:
31  typedef Transform<TScalarType, 3, 3> Superclass;
34  typedef typename Superclass::OutputPointType OutputPointType;
35  typedef typename Superclass::OutputVectorType OutputVectorType;
36  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
37  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
38  typedef typename Superclass::InputPointType InputPointType;
39  typedef typename Superclass::InputVectorType InputVectorType;
40  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
41  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
42  typedef typename Superclass::ParametersType ParametersType;
43  typedef typename Superclass::JacobianType JacobianType;
44  typedef typename Superclass::JacobianPositionType JacobianPositionType;
45 
46  itkFactorylessNewMacro(Self);
47 
48  itkCloneMacro(Self);
49 
50  //##Documentation
51  //## @brief Get the vtkAbstractTransform (stored in m_VtkAbstractTransform)
52  virtual vtkAbstractTransform *GetVtkAbstractTransform() const;
53  //##Documentation
54  //## @brief Get the inverse vtkAbstractTransform (stored in m_InverseVtkAbstractTransform)
55  virtual vtkAbstractTransform *GetInverseVtkAbstractTransform() const;
56 
57  //##Documentation
58  //## @brief Set the vtkAbstractTransform (stored in m_VtkAbstractTransform)
59  virtual void SetVtkAbstractTransform(vtkAbstractTransform *aVtkAbstractTransform);
60 
61  using Superclass::TransformVector;
62  using Superclass::TransformCovariantVector;
63 
64  OutputPointType TransformPoint(const InputPointType &) const override;
65  OutputVectorType TransformVector(const InputVectorType &) const override;
66  OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override;
67  OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override;
68 
69  virtual InputPointType BackTransform(const OutputPointType &point) const;
70  virtual InputVectorType BackTransform(const OutputVectorType &vector) const;
71  virtual InputVnlVectorType BackTransform(const OutputVnlVectorType &vector) const;
72  virtual InputCovariantVectorType BackTransform(const OutputCovariantVectorType &vector) const;
73 
74  void SetParameters(const ParametersType &) override;
75  void SetFixedParameters(const ParametersType &) override;
76  void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const override;
77  void ComputeJacobianWithRespectToPosition(const InputPointType &, JacobianPositionType &) const override;
78 
79  itk::ModifiedTimeType GetMTime() const override;
80 
81  protected:
83  ~VtkAbstractTransform() override;
84 
85  //##Documentation
86  //## @brief Instance of the vtkAbstractTransform
87  vtkAbstractTransform *m_VtkAbstractTransform;
88 
89  //##Documentation
90  //## @brief Instance of the vtkAbstractTransform
91  vtkAbstractTransform *m_InverseVtkAbstractTransform;
92 
93  mutable unsigned long m_LastVtkAbstractTransformTimeStamp;
94  };
95 
96 } // namespace itk
97 
98 #ifndef MITK_MANUAL_INSTANTIATION
99 #include "itkVtkAbstractTransform.txx"
100 #endif
101 
102 #endif /* MITKVTKABSTRACTTRANSFORM_H_HEADER_INCLUDED_C1C68A2C */
Superclass::InputVectorType InputVectorType
Adapter from vtkAbstractTransform to itk::Transform<TScalarType, 3, 3>
Superclass::OutputVectorType OutputVectorType
virtual InputPointType BackTransform(const OutputPointType &point) const
itk::ModifiedTimeType GetMTime() const override
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override
OutputPointType TransformPoint(const InputPointType &) const override
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::InputPointType InputPointType
virtual vtkAbstractTransform * GetInverseVtkAbstractTransform() const
Get the inverse vtkAbstractTransform (stored in m_InverseVtkAbstractTransform)
unsigned long m_LastVtkAbstractTransformTimeStamp
void ComputeJacobianWithRespectToPosition(const InputPointType &, JacobianPositionType &) const override
Transform< TScalarType, 3, 3 > Superclass
Superclass::ParametersType ParametersType
vtkAbstractTransform * m_InverseVtkAbstractTransform
Instance of the vtkAbstractTransform.
Superclass::OutputPointType OutputPointType
Superclass::JacobianType JacobianType
Superclass::InputCovariantVectorType InputCovariantVectorType
SmartPointer< const Self > ConstPointer
void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const override
virtual void SetVtkAbstractTransform(vtkAbstractTransform *aVtkAbstractTransform)
Set the vtkAbstractTransform (stored in m_VtkAbstractTransform)
void SetParameters(const ParametersType &) override
void SetFixedParameters(const ParametersType &) override
Superclass::JacobianPositionType JacobianPositionType
vtkAbstractTransform * m_VtkAbstractTransform
Instance of the vtkAbstractTransform.
Superclass::OutputCovariantVectorType OutputCovariantVectorType
OutputVectorType TransformVector(const InputVectorType &) const override
~VtkAbstractTransform() override
virtual vtkAbstractTransform * GetVtkAbstractTransform() const
Get the vtkAbstractTransform (stored in m_VtkAbstractTransform)