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

itkScaleSkewVersor3DTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkScaleSkewVersor3DTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-03 15:09:08 $
00007   Version:   $Revision: 1.14 $
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 __itkScaleSkewVersor3DTransform_h
00019 #define __itkScaleSkewVersor3DTransform_h
00020 
00021 #include <iostream>
00022 #include "itkVersorRigid3DTransform.h"
00023 
00024 namespace itk
00025 {
00026 
00048 template < class TScalarType=double >  // Data type for scalars:float or double
00049 class ITK_EXPORT ScaleSkewVersor3DTransform : 
00050             public VersorRigid3DTransform< TScalarType > 
00051 {
00052 public:
00054   typedef ScaleSkewVersor3DTransform              Self;
00055   typedef VersorRigid3DTransform< TScalarType >   Superclass;
00056   typedef SmartPointer<Self>                      Pointer;
00057   typedef SmartPointer<const Self>                ConstPointer;
00058 
00060   itkNewMacro( Self );
00061 
00063   itkTypeMacro( ScaleSkewVersor3DTransform, VersorRigid3DTransform );
00064 
00066   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00067   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00068   itkStaticConstMacro(ParametersDimension, unsigned int, 15);
00070 
00072   typedef typename Superclass::ParametersType         ParametersType;
00073   typedef typename Superclass::JacobianType           JacobianType;
00074   typedef typename Superclass::ScalarType             ScalarType;
00075   typedef typename Superclass::InputPointType         InputPointType;
00076   typedef typename Superclass::OutputPointType        OutputPointType;
00077   typedef typename Superclass::InputVectorType        InputVectorType;
00078   typedef typename Superclass::OutputVectorType       OutputVectorType;
00079   typedef typename Superclass::InputVnlVectorType     InputVnlVectorType;
00080   typedef typename Superclass::OutputVnlVectorType    OutputVnlVectorType;
00081   typedef typename Superclass::InputCovariantVectorType 
00082                                                       InputCovariantVectorType;
00083   typedef typename Superclass::OutputCovariantVectorType
00084                                                       OutputCovariantVectorType;
00085   typedef typename Superclass::MatrixType             MatrixType;
00086   typedef typename Superclass::InverseMatrixType      InverseMatrixType;
00087   typedef typename Superclass::CenterType             CenterType;
00088   typedef typename Superclass::OffsetType             OffsetType;
00089   typedef typename Superclass::TranslationType        TranslationType;
00090 
00091   typedef typename Superclass::VersorType             VersorType;
00092   typedef typename Superclass::AxisType               AxisType;
00093   typedef typename Superclass::AngleType              AngleType;
00094 
00096   typedef Vector<TScalarType, 3> 
00097                                                       ScaleVectorType;
00098   typedef Vector<TScalarType, 6 >                     SkewVectorType;
00099 
00103   virtual void SetMatrix(const MatrixType &matrix);
00104 
00113   virtual void SetParameters( const ParametersType & parameters );
00114   virtual const ParametersType& GetParameters(void) const;
00116 
00117   void SetScale( const ScaleVectorType & scale );
00118   itkGetConstReferenceMacro( Scale, ScaleVectorType );
00119 
00120   void SetSkew( const SkewVectorType & skew );
00121   itkGetConstReferenceMacro( Skew, SkewVectorType );
00122 
00123   void SetIdentity();
00124 
00129   const JacobianType & GetJacobian(const InputPointType  &point ) const;
00130 
00131 protected:
00132   ScaleSkewVersor3DTransform();
00133   ScaleSkewVersor3DTransform(const MatrixType &matrix,
00134                              const OutputVectorType &offset);
00135   ScaleSkewVersor3DTransform(unsigned int outputDims,
00136                              unsigned int paramDims);
00137   ~ScaleSkewVersor3DTransform(){}
00138 
00139   void PrintSelf(std::ostream &os, Indent indent) const;
00140 
00141   void SetVarScale(const ScaleVectorType & scale)
00142     { m_Scale = scale; }
00143 
00144   void SetVarSkew(const SkewVectorType & skew)
00145     { m_Skew = skew; }
00146 
00148   void ComputeMatrix(void);
00149   void ComputeMatrixParameters(void);
00151 
00152 private:
00153   ScaleSkewVersor3DTransform(const Self&); //purposely not implemented
00154   void operator=(const Self&); //purposely not implemented
00155 
00157   ScaleVectorType          m_Scale;
00158 
00160   SkewVectorType           m_Skew;
00161 
00162 }; //class ScaleSkewVersor3DTransform
00163 
00164 
00165 }  // namespace itk
00166 
00167 // Define instantiation macro for this template.
00168 #define ITK_TEMPLATE_ScaleSkewVersor3DTransform(_, EXPORT, x, y) namespace itk { \
00169   _(1(class EXPORT ScaleSkewVersor3DTransform< ITK_TEMPLATE_1 x >)) \
00170   namespace Templates { typedef ScaleSkewVersor3DTransform< ITK_TEMPLATE_1 x > \
00171                                                   ScaleSkewVersor3DTransform##y; } \
00172   }
00173 
00174 #if ITK_TEMPLATE_EXPLICIT
00175 # include "Templates/itkScaleSkewVersor3DTransform+-.h"
00176 #endif
00177 
00178 #if ITK_TEMPLATE_TXX
00179 # include "itkScaleSkewVersor3DTransform.txx"
00180 #endif
00181 
00182 
00183 #endif /* __ScaleSkewVersor3DTransform_h */
00184 

Generated at Thu May 28 11:33:04 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000