00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkVersorTransform.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:29 $ 00007 Version: $Revision: 1.6 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 __itkVersorTransform_h 00019 #define __itkVersorTransform_h 00020 00021 #include <iostream> 00022 #include "itkRigid3DTransform.h" 00023 00024 namespace itk 00025 { 00026 00036 template < class TScalarType=double > // Data type for scalars (float or double) 00037 class ITK_EXPORT VersorTransform : 00038 public Rigid3DTransform< TScalarType > 00039 { 00040 public: 00041 00045 typedef VersorTransform Self; 00046 00047 00049 itkStaticConstMacro(SpaceDimension, unsigned int, 3); 00050 itkStaticConstMacro(ParametersDimension, unsigned int, 3); 00051 00055 typedef Rigid3DTransform< TScalarType > Superclass; 00056 00057 00061 typedef typename Superclass::ScalarType ScalarType; 00062 00063 00067 typedef typename Superclass::ParametersType ParametersType; 00068 00069 00073 typedef typename Superclass::JacobianType JacobianType; 00074 00078 typedef typename Superclass::VnlQuaternionType VnlQuaternionType; 00079 00083 typedef typename Superclass::VersorType VersorType; 00084 typedef typename VersorType::VectorType AxisType; 00085 typedef typename VersorType::ValueType AngleType; 00086 00090 typedef typename Superclass::OffsetType OffsetType; 00091 00095 typedef typename Superclass::InputPointType InputPointType; 00096 typedef typename Superclass::OutputPointType OutputPointType; 00097 00101 typedef typename Superclass::InputVectorType InputVectorType; 00102 typedef typename Superclass::OutputVectorType OutputVectorType; 00103 00107 typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType; 00108 typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType; 00109 00113 typedef typename Superclass::InputVnlVectorType InputVnlVectorType; 00114 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType; 00115 00116 00117 00118 00122 typedef SmartPointer<Self> Pointer; 00123 typedef SmartPointer<const Self> ConstPointer; 00124 00125 00129 itkTypeMacro( VersorTransform, Rigid3DTransform ); 00130 00131 00135 itkNewMacro( Self ); 00136 00137 00148 void SetParameters( const ParametersType & parameters ); 00149 00150 00154 void SetRotation( const VersorType & versor ); 00155 void SetRotation( const AxisType & axis, AngleType angle ); 00156 00157 00166 const JacobianType & GetJacobian(const InputPointType &point ) const; 00167 00168 00169 00170 protected: 00174 void PrintSelf(std::ostream &os, Indent indent) const; 00179 VersorTransform(); 00180 00187 VersorTransform(const Self & other); 00188 00192 ~VersorTransform(){}; 00193 00194 00198 const Self & operator=( const Self & ); 00199 00200 00205 void ComputeMatrix(void); 00206 00207 private: 00208 00212 VersorType m_Versor; 00213 00214 }; //class VersorTransform 00215 00216 00217 } // namespace itk 00218 00219 00220 #ifndef ITK_MANUAL_INSTANTIATION 00221 #include "itkVersorTransform.txx" 00222 #endif 00223 00224 #endif /* __itkVersorTransform_h */