Medical Imaging Interaction Toolkit  2018.4.99-08619e4f
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 
45  itkFactorylessNewMacro(Self);
46 
47  itkCloneMacro(Self);
48 
49  //##Documentation
50  //## @brief Get the vtkAbstractTransform (stored in m_VtkAbstractTransform)
51  virtual vtkAbstractTransform *GetVtkAbstractTransform() const;
52  //##Documentation
53  //## @brief Get the inverse vtkAbstractTransform (stored in m_InverseVtkAbstractTransform)
54  virtual vtkAbstractTransform *GetInverseVtkAbstractTransform() const;
55 
56  //##Documentation
57  //## @brief Set the vtkAbstractTransform (stored in m_VtkAbstractTransform)
58  virtual void SetVtkAbstractTransform(vtkAbstractTransform *aVtkAbstractTransform);
59 
60  using Superclass::TransformVector;
61  using Superclass::TransformCovariantVector;
62 
63  OutputPointType TransformPoint(const InputPointType &) const override;
64  OutputVectorType TransformVector(const InputVectorType &) const override;
65  OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override;
66  OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override;
67 
68  virtual InputPointType BackTransform(const OutputPointType &point) const;
69  virtual InputVectorType BackTransform(const OutputVectorType &vector) const;
70  virtual InputVnlVectorType BackTransform(const OutputVnlVectorType &vector) const;
71  virtual InputCovariantVectorType BackTransform(const OutputCovariantVectorType &vector) const;
72 
73  void SetParameters(const ParametersType &) override;
74  void SetFixedParameters(const ParametersType &) override;
75  void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const override;
76  void ComputeJacobianWithRespectToPosition(const InputPointType &, JacobianType &) const override;
77 
78  unsigned long GetMTime() const override;
79 
80  protected:
82  ~VtkAbstractTransform() override;
83 
84  //##Documentation
85  //## @brief Instance of the vtkAbstractTransform
86  vtkAbstractTransform *m_VtkAbstractTransform;
87 
88  //##Documentation
89  //## @brief Instance of the vtkAbstractTransform
90  vtkAbstractTransform *m_InverseVtkAbstractTransform;
91 
92  mutable unsigned long m_LastVtkAbstractTransformTimeStamp;
93  };
94 
95 } // namespace itk
96 
97 #ifndef MITK_MANUAL_INSTANTIATION
99 #endif
100 
101 #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
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
Transform< TScalarType, 3, 3 > Superclass
unsigned long GetMTime() const override
Superclass::ParametersType ParametersType
vtkAbstractTransform * m_InverseVtkAbstractTransform
Instance of the vtkAbstractTransform.
Superclass::OutputPointType OutputPointType
Superclass::JacobianType JacobianType
Superclass::InputCovariantVectorType InputCovariantVectorType
void ComputeJacobianWithRespectToPosition(const InputPointType &, JacobianType &) const override
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
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)