go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAffineDTI3DTransform.h
Go to the documentation of this file.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 
00015 /*=========================================================================
00016 
00017   Program:   Insight Segmentation & Registration Toolkit
00018   Module:    $RCSfile: itkAffineDTI3DTransform.h,v $
00019   Language:  C++
00020   Date:      $Date: 2008-10-13 15:36:31 $
00021   Version:   $Revision: 1.14 $
00022 
00023   Copyright (c) Insight Software Consortium. All rights reserved.
00024   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00025 
00026      This software is distributed WITHOUT ANY WARRANTY; without even
00027      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00028      PURPOSE.  See the above copyright notices for more information.
00029 
00030 =========================================================================*/
00031 #ifndef __itkAffineDTI3DTransform_h
00032 #define __itkAffineDTI3DTransform_h
00033 
00034 #include <iostream>
00035 #include "itkAdvancedMatrixOffsetTransformBase.h"
00036 
00037 namespace itk
00038 {
00039 
00074 template < class TScalarType=double >    // Data type for scalars (float or double)
00075 class ITK_EXPORT AffineDTI3DTransform :
00076      public AdvancedMatrixOffsetTransformBase< TScalarType,3,3 >
00077 {
00078 public:
00080   typedef AffineDTI3DTransform                  Self;
00081   typedef AdvancedMatrixOffsetTransformBase< TScalarType,3,3 >   Superclass;
00082   typedef SmartPointer<Self>                Pointer;
00083   typedef SmartPointer<const Self>          ConstPointer;
00084 
00086   itkNewMacro( Self );
00087 
00089   itkTypeMacro( AffineDTI3DTransform, AdvancedMatrixOffsetTransformBase );
00090 
00092   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00093   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00094   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00095   itkStaticConstMacro(ParametersDimension, unsigned int, 12);
00096 
00097   typedef typename Superclass::ParametersType             ParametersType;
00098   typedef typename Superclass::JacobianType               JacobianType;
00099   typedef typename Superclass::ScalarType                 ScalarType;
00100   typedef typename Superclass::InputVectorType            InputVectorType;
00101   typedef typename Superclass::OutputVectorType           OutputVectorType;
00102   typedef typename Superclass::InputCovariantVectorType   InputCovariantVectorType;
00103   typedef typename Superclass::OutputCovariantVectorType  OutputCovariantVectorType;
00104   typedef typename Superclass::InputVnlVectorType         InputVnlVectorType;
00105   typedef typename Superclass::OutputVnlVectorType        OutputVnlVectorType;
00106   typedef typename Superclass::InputPointType             InputPointType;
00107   typedef typename Superclass::OutputPointType            OutputPointType;
00108   typedef typename Superclass::MatrixType                 MatrixType;
00109   typedef typename Superclass::InverseMatrixType          InverseMatrixType;
00110   typedef typename Superclass::CenterType                 CenterType;
00111   typedef typename Superclass::TranslationType            TranslationType;
00112   typedef typename Superclass::OffsetType                 OffsetType;
00113   typedef typename Superclass::ScalarType                 AngleType;
00114 
00115   typedef typename Superclass
00116     ::NonZeroJacobianIndicesType                    NonZeroJacobianIndicesType;
00117   typedef typename Superclass::SpatialJacobianType  SpatialJacobianType;
00118   typedef typename Superclass
00119     ::JacobianOfSpatialJacobianType                 JacobianOfSpatialJacobianType;
00120   typedef typename Superclass::SpatialHessianType   SpatialHessianType;
00121   typedef typename Superclass
00122     ::JacobianOfSpatialHessianType                  JacobianOfSpatialHessianType;
00123   typedef typename Superclass::InternalMatrixType   InternalMatrixType;
00124 
00125   typedef FixedArray< ScalarType >                  ScalarArrayType;
00126 
00132   void SetParameters( const ParametersType & parameters );
00133   const ParametersType & GetParameters(void) const;
00134 
00136   virtual void GetJacobian(
00137     const InputPointType &,
00138     JacobianType &,
00139     NonZeroJacobianIndicesType & ) const;
00140 
00141   virtual void SetIdentity(void);
00142 
00143 protected:
00144   AffineDTI3DTransform();
00145   AffineDTI3DTransform(const MatrixType & matrix,
00146                    const OutputPointType & offset);
00147   AffineDTI3DTransform(unsigned int outputSpaceDims,
00148                    unsigned int paramsSpaceDims);
00149 
00150   ~AffineDTI3DTransform(){};
00151 
00152   void PrintSelf(std::ostream &os, Indent indent) const;
00153 
00155   void SetVarAngleScaleShear(
00156     ScalarArrayType angle,
00157     ScalarArrayType shear,
00158     ScalarArrayType scale );
00159 
00161   void ComputeMatrix(void);
00162   void ComputeMatrixParameters(void);
00163 
00165   virtual void PrecomputeJacobianOfSpatialJacobian(void);
00166 
00167 private:
00168   AffineDTI3DTransform(const Self&); //purposely not implemented
00169   void operator=(const Self&); //purposely not implemented
00170 
00171   ScalarArrayType m_Angle;
00172   ScalarArrayType m_Shear;
00173   ScalarArrayType m_Scale;
00174 
00175 }; //class AffineDTI3DTransform
00176 
00177 
00178 }  // namespace itk
00179 
00180 // Define instantiation macro for this template.
00181 #define ITK_TEMPLATE_AffineDTI3DTransform(_, EXPORT, x, y) namespace itk { \
00182   _(1(class EXPORT AffineDTI3DTransform< ITK_TEMPLATE_1 x >)) \
00183   namespace Templates { typedef AffineDTI3DTransform< ITK_TEMPLATE_1 x > \
00184                                             AffineDTI3DTransform##y; } \
00185   }
00186 
00187 #if ITK_TEMPLATE_EXPLICIT
00188 # include "Templates/itkAffineDTI3DTransform+-.h"
00189 #endif
00190 
00191 #if ITK_TEMPLATE_TXX
00192 # include "itkAffineDTI3DTransform.txx"
00193 #endif
00194 
00195 #endif /* __itkAffineDTI3DTransform_h */


Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo