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

itkVersorTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVersorTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/09/25 17:25:57 $
00007   Version:   $Revision: 1.12 $
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 #include "vnl/vnl_quaternion.h"
00024 #include "itkVersor.h"
00025 
00026 namespace itk
00027 {
00028 
00038 template < class TScalarType=double >    // Data type for scalars (float or double)
00039 class ITK_EXPORT VersorTransform : 
00040   public Rigid3DTransform< TScalarType > 
00041 {
00042 public:
00043 
00045     typedef VersorTransform                   Self;
00046     typedef Rigid3DTransform< TScalarType >   Superclass;
00047     typedef SmartPointer<Self>                Pointer;
00048     typedef SmartPointer<const Self>          ConstPointer;
00049 
00051     itkTypeMacro( VersorTransform, Rigid3DTransform );
00052 
00054     itkNewMacro( Self );
00055 
00057     itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00058     itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00059     itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00060     itkStaticConstMacro(ParametersDimension, unsigned int, 3);
00061 
00063     typedef typename Superclass::ParametersType         ParametersType;
00064     typedef typename Superclass::JacobianType           JacobianType;
00065     typedef typename Superclass::ScalarType             ScalarType;
00066     typedef typename Superclass::InputPointType         InputPointType;
00067     typedef typename Superclass::OutputPointType        OutputPointType;
00068     typedef typename Superclass::InputVectorType        InputVectorType;
00069     typedef typename Superclass::OutputVectorType       OutputVectorType;
00070     typedef typename Superclass::InputVnlVectorType     InputVnlVectorType;
00071     typedef typename Superclass::OutputVnlVectorType    OutputVnlVectorType;
00072     typedef typename Superclass::InputCovariantVectorType 
00073                                                       InputCovariantVectorType;
00074     typedef typename Superclass::OutputCovariantVectorType      
00075                                                       OutputCovariantVectorType;
00076     typedef typename Superclass::MatrixType             MatrixType;
00077     typedef typename Superclass::InverseMatrixType      InverseMatrixType;
00078     typedef typename Superclass::CenterType             CenterType;
00079     typedef typename Superclass::OffsetType             OffsetType;
00080 
00084     typedef vnl_quaternion<TScalarType>                 VnlQuaternionType;
00085 
00089     typedef Versor<TScalarType>                   VersorType;
00090     typedef typename VersorType::VectorType       AxisType;
00091     typedef typename VersorType::ValueType        AngleType;
00092 
00093 
00094 
00105     void SetParameters( const ParametersType & parameters );
00106 
00108     const ParametersType& GetParameters(void) const;
00109 
00113     void SetRotation( const VersorType & versor );
00114     void SetRotation( const AxisType & axis, AngleType angle );
00115     itkGetConstReferenceMacro(Versor, VersorType);
00116 
00118     virtual void SetIdentity(void);
00119 
00128     const JacobianType & GetJacobian(const InputPointType  &point ) const;
00129 
00130  protected:
00135     VersorTransform(const MatrixType &matrix,
00136                     const OutputVectorType &offset);
00137     VersorTransform(unsigned int outputDims,
00138                     unsigned int paramDims);
00139     VersorTransform();
00140 
00144     ~VersorTransform(){};
00145 
00148     virtual void SetRotationMatrix(const MatrixType & matrix)
00149       { this->Superclass::SetRotationMatrix( matrix ); }
00150     
00151     void SetVarVersor(const VersorType & newVersor)
00152       { m_Versor = newVersor; }
00153 
00157     void PrintSelf(std::ostream &os, Indent indent) const;
00158 
00159 
00164     void ComputeMatrix(void);
00165     void ComputeMatrixParameters(void);
00166 
00167 private:
00171     VersorTransform(const Self & other); // Not implemented
00172 
00176     const Self & operator=( const Self & ); // Not implemented
00177 
00181     VersorType    m_Versor;
00182 
00183 }; //class VersorTransform
00184 
00185 
00186 }  // namespace itk
00187 
00188 
00189 #ifndef ITK_MANUAL_INSTANTIATION
00190 #include "itkVersorTransform.txx"
00191 #endif
00192 
00193 #endif /* __itkVersorTransform_h */

Generated at Thu May 25 00:15:24 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000