00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef MITKVTKABSTRACTTRANSFORM_H_HEADER_INCLUDED_C1C68A2C 00019 #define MITKVTKABSTRACTTRANSFORM_H_HEADER_INCLUDED_C1C68A2C 00020 00021 #include "mitkCommon.h" 00022 #include "itkTransform.h" 00023 00024 class vtkAbstractTransform; 00025 00026 namespace itk { 00027 00028 //##Documentation 00029 //## @brief Adapter from vtkAbstractTransform to itk::Transform<TScalarType, 3, 3> 00030 //## @ingroup Geometry 00031 template <class TScalarType> 00032 class VtkAbstractTransform : public itk::Transform<TScalarType, 3, 3> 00033 { 00034 public: 00035 typedef VtkAbstractTransform Self; 00036 typedef Transform< TScalarType, 3, 3 > Superclass; 00037 typedef SmartPointer<Self> Pointer; 00038 typedef SmartPointer<const Self> ConstPointer; 00039 typedef typename Superclass::OutputPointType OutputPointType; 00040 typedef typename Superclass::OutputVectorType OutputVectorType; 00041 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType; 00042 typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType; 00043 typedef typename Superclass::InputPointType InputPointType; 00044 typedef typename Superclass::InputVectorType InputVectorType; 00045 typedef typename Superclass::InputVnlVectorType InputVnlVectorType; 00046 typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType; 00047 00048 00049 itkNewMacro(Self); 00050 00051 //##Documentation 00052 //## @brief Get the vtkAbstractTransform (stored in m_VtkAbstractTransform) 00053 virtual vtkAbstractTransform* GetVtkAbstractTransform() const; 00054 //##Documentation 00055 //## @brief Get the inverse vtkAbstractTransform (stored in m_InverseVtkAbstractTransform) 00056 virtual vtkAbstractTransform* GetInverseVtkAbstractTransform() const; 00057 00058 //##Documentation 00059 //## @brief Set the vtkAbstractTransform (stored in m_VtkAbstractTransform) 00060 virtual void SetVtkAbstractTransform(vtkAbstractTransform* aVtkAbstractTransform); 00061 00062 virtual OutputPointType TransformPoint(const InputPointType & ) const; 00063 virtual OutputVectorType TransformVector(const InputVectorType &) const; 00064 virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const; 00065 virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const; 00066 00067 virtual InputPointType BackTransform(const OutputPointType &point ) const; 00068 virtual InputVectorType BackTransform(const OutputVectorType &vector) const; 00069 virtual InputVnlVectorType BackTransform(const OutputVnlVectorType &vector) const; 00070 virtual InputCovariantVectorType BackTransform(const OutputCovariantVectorType &vector) const; 00071 00072 virtual unsigned long GetMTime() const; 00073 00074 protected: 00075 VtkAbstractTransform(); 00076 virtual ~VtkAbstractTransform(); 00077 00078 //##Documentation 00079 //## @brief Instance of the vtkAbstractTransform 00080 vtkAbstractTransform* m_VtkAbstractTransform; 00081 00082 //##Documentation 00083 //## @brief Instance of the vtkAbstractTransform 00084 vtkAbstractTransform* m_InverseVtkAbstractTransform; 00085 00086 mutable unsigned long m_LastVtkAbstractTransformTimeStamp; 00087 }; 00088 00089 } // namespace itk 00090 00091 #ifndef MITK_MANUAL_INSTANTIATION 00092 #include "itkVtkAbstractTransform.txx" 00093 #endif 00094 00095 #endif /* MITKVTKABSTRACTTRANSFORM_H_HEADER_INCLUDED_C1C68A2C */