Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkRigid3DPerspectiveTransform.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkRigid3DPerspectiveTransform.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:24 $ 00007 Version: $Revision: 1.27 $ 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 #ifndef __itkRigid3DPerspectiveTransform_h 00018 #define __itkRigid3DPerspectiveTransform_h 00019 00020 #include "itkExceptionObject.h" 00021 #include "vnl/vnl_quaternion.h" 00022 #include <iostream> 00023 #include "itkMatrix.h" 00024 #include "itkTransform.h" 00025 #include "itkVersor.h" 00026 00027 namespace itk 00028 { 00029 00038 template < 00039 class TScalarType=double> // Data type for scalars (float or double) 00040 class ITK_EXPORT Rigid3DPerspectiveTransform : 00041 public Transform< TScalarType, 3, 2 > 00042 { 00043 public: 00045 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3); 00046 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 2); 00047 00049 itkStaticConstMacro(SpaceDimension, unsigned int, 3); 00050 itkStaticConstMacro(ParametersDimension, unsigned int, 7); 00051 00053 typedef Rigid3DPerspectiveTransform Self; 00054 typedef Transform< TScalarType, 00055 itkGetStaticConstMacro(InputSpaceDimension), 00056 itkGetStaticConstMacro(OutputSpaceDimension)> Superclass; 00057 00058 typedef SmartPointer<Self> Pointer; 00059 typedef SmartPointer<const Self> ConstPointer; 00060 00062 itkTypeMacro( Rigid3DPerspectiveTransform, Transform ); 00063 00065 itkNewMacro( Self ); 00066 00068 typedef typename Superclass::ScalarType ScalarType; 00069 00071 typedef typename Superclass::ParametersType ParametersType; 00072 00074 typedef typename Superclass::JacobianType JacobianType; 00075 00077 typedef Matrix<TScalarType, itkGetStaticConstMacro(InputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> MatrixType; 00078 00080 typedef Vector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> OffsetType; 00081 00083 typedef Vector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> InputVectorType; 00084 typedef Vector<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> OutputVectorType; 00085 00087 typedef Point<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> InputPointType; 00088 typedef Point<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> OutputPointType; 00089 00091 typedef vnl_quaternion<TScalarType> VnlQuaternionType; 00092 00094 typedef Versor<TScalarType> VersorType; 00095 typedef typename VersorType::VectorType AxisType; 00096 typedef typename VersorType::ValueType AngleType; 00097 00101 const OffsetType & GetOffset() const 00102 { return m_Offset; } 00103 00107 const VersorType & GetRotation() const 00108 { return m_Versor; } 00109 00114 void SetParameters( const ParametersType & parameters ); 00115 itkGetConstReferenceMacro(Parameters, ParametersType); 00116 00119 void SetOffset(const OffsetType &offset) 00120 { m_Offset = offset; return; } 00121 00124 void SetRotation(const VersorType &rotation); 00125 00130 void SetRotation(const Vector<TScalarType,3> &axis, double angle); 00131 00135 void SetFocalDistance( TScalarType focalDistance ) 00136 { m_FocalDistance = focalDistance; } 00137 00139 double GetFocalDistance( void ) const 00140 { return m_FocalDistance; } 00141 00145 OutputPointType TransformPoint(const InputPointType &point ) const; 00146 00148 const MatrixType & GetRotationMatrix() const {return m_RotationMatrix;} 00149 00151 void ComputeMatrix(void); 00152 00154 virtual const JacobianType & GetJacobian(const InputPointType &point ) const; 00155 00157 itkGetConstMacro(FixedOffset,OffsetType); 00158 itkSetMacro(FixedOffset,OffsetType); 00159 00161 itkSetMacro(CenterOfRotation,InputPointType); 00162 itkGetConstMacro(CenterOfRotation,InputPointType); 00163 00164 00165 protected: 00166 Rigid3DPerspectiveTransform(); 00167 ~Rigid3DPerspectiveTransform(); 00168 void PrintSelf(std::ostream &os, Indent indent) const; 00169 00170 private: 00171 Rigid3DPerspectiveTransform(const Self&); //purposely not implemented 00172 void operator=(const Self&); //purposely not implemented 00173 00175 OffsetType m_Offset; 00176 00178 VersorType m_Versor; 00179 00181 TScalarType m_FocalDistance; 00182 00184 MatrixType m_RotationMatrix; 00185 00186 00188 OffsetType m_FixedOffset; 00189 00191 InputPointType m_CenterOfRotation; 00192 00193 00194 }; //class Rigid3DPerspectiveTransform: 00195 00196 00197 00198 } // namespace itk 00199 00200 00201 #ifndef ITK_MANUAL_INSTANTIATION 00202 #include "itkRigid3DPerspectiveTransform.txx" 00203 #endif 00204 00205 #endif /* __itkRigid3DPerspectiveTransform_h */

Generated at Sun Apr 1 02:42:32 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000