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: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.22 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkRigid3DPerspectiveTransform_h
00019 #define __itkRigid3DPerspectiveTransform_h
00020 
00021 #include "itkExceptionObject.h"
00022 #include "vnl/vnl_quaternion.h"
00023 #include <iostream>
00024 #include "itkMatrix.h"
00025 #include "itkTransform.h"
00026 #include "itkVersor.h"
00027 
00028 namespace itk
00029 {
00030 
00039 template <
00040     class TScalarType=double>    // Data type for scalars (float or double)
00041 class ITK_EXPORT Rigid3DPerspectiveTransform : 
00042         public Transform<  TScalarType, 3, 2 > 
00043 {
00044 public:
00046   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00047   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 2);
00048 
00050   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00051   itkStaticConstMacro(ParametersDimension, unsigned int, 6);
00052 
00054   typedef Rigid3DPerspectiveTransform Self;
00055   typedef Transform<  TScalarType, 
00056                       itkGetStaticConstMacro(InputSpaceDimension),
00057                       itkGetStaticConstMacro(OutputSpaceDimension)> Superclass;
00058 
00059   typedef SmartPointer<Self>        Pointer;
00060   typedef SmartPointer<const Self>  ConstPointer;
00061   
00063   itkTypeMacro( Rigid3DPerspectiveTransform, Transform );
00064 
00066   itkNewMacro( Self );
00067 
00069   typedef typename Superclass::ScalarType  ScalarType;
00070 
00072   typedef typename Superclass::ParametersType  ParametersType;
00073 
00075   typedef typename Superclass::JacobianType  JacobianType;
00076 
00078   typedef Matrix<TScalarType, itkGetStaticConstMacro(InputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> MatrixType;
00079 
00081   typedef Vector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> OffsetType;
00082 
00084   typedef Vector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> InputVectorType;
00085   typedef Vector<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> OutputVectorType;
00086   
00088   typedef Point<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)>    InputPointType;
00089   typedef Point<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)>    OutputPointType;
00090   
00092   typedef vnl_quaternion<TScalarType>           VnlQuaternionType;
00093 
00095   typedef Versor<TScalarType>             VersorType;
00096   typedef typename VersorType::VectorType  AxisType;
00097   typedef typename VersorType::ValueType   AngleType;
00098   
00102   const OffsetType & GetOffset() const
00103     { return m_Offset; }
00104 
00108   const VersorType & GetRotation() const
00109     { return m_Versor; }
00110 
00115   void SetParameters( const ParametersType & parameters );
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 
00143   void SetHeight( TScalarType height )
00144     { m_Height = height; }
00145 
00151   void SetWidth( TScalarType width )
00152     { m_Width = width; }
00153 
00157   OutputPointType  TransformPoint(const InputPointType  &point ) const;
00158 
00160   void ComputeMatrix(void);
00161 
00163   virtual const JacobianType & GetJacobian(const InputPointType  &point ) const;
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   TScalarType         m_Height;  
00185 
00187   TScalarType         m_Width;  
00188 
00190   MatrixType          m_RotationMatrix;   
00191 
00192 }; //class Rigid3DPerspectiveTransform:
00193 
00194 
00195 
00196 }  // namespace itk
00197 
00198 
00199 #ifndef ITK_MANUAL_INSTANTIATION
00200 #include "itkRigid3DPerspectiveTransform.txx"
00201 #endif
00202 
00203 #endif /* __itkRigid3DPerspectiveTransform_h */

Generated at Wed Mar 12 01:13:10 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000