ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkCenteredEuler3DTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkCenteredEuler3DTransform_h
00019 #define __itkCenteredEuler3DTransform_h
00020 
00021 #include <iostream>
00022 #include "itkEuler3DTransform.h"
00023 #include "itkMacro.h"
00024 #include "itkVersor.h"
00025 
00026 namespace itk
00027 {
00036 template <class TScalarType = double>
00037 // Data type for scalars
00038 class ITK_EXPORT CenteredEuler3DTransform :
00039   public Euler3DTransform<TScalarType>
00040 {
00041 public:
00043   typedef CenteredEuler3DTransform      Self;
00044   typedef Euler3DTransform<TScalarType> Superclass;
00045   typedef SmartPointer<Self>            Pointer;
00046   typedef SmartPointer<const Self>      ConstPointer;
00047 
00049   itkNewMacro(Self);
00050 
00052   itkTypeMacro(CenteredEuler3DTransform, Euler3DTransform);
00053 
00055   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00056   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00057   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00058   itkStaticConstMacro(ParametersDimension, unsigned int, 9);
00060 
00061   typedef typename Superclass::ParametersType      ParametersType;
00062   typedef typename Superclass::ParametersValueType ParametersValueType;
00063   typedef typename Superclass::JacobianType        JacobianType;
00064   typedef typename Superclass::ScalarType          ScalarType;
00065   typedef typename Superclass::InputVectorType     InputVectorType;
00066   typedef typename Superclass::OutputVectorType    OutputVectorType;
00067   typedef typename Superclass::InputCovariantVectorType
00068   InputCovariantVectorType;
00069   typedef typename Superclass::OutputCovariantVectorType
00070   OutputCovariantVectorType;
00071 
00072   typedef typename Superclass::InputVnlVectorType   InputVnlVectorType;
00073   typedef typename Superclass::OutputVnlVectorType  OutputVnlVectorType;
00074   typedef typename Superclass::InputPointType       InputPointType;
00075   typedef typename Superclass::OutputPointType      OutputPointType;
00076   typedef typename Superclass::MatrixType           MatrixType;
00077   typedef typename Superclass::InverseMatrixType    InverseMatrixType;
00078   typedef typename Superclass::CenterType           CenterType;
00079   typedef typename Superclass::TranslationType      TranslationType;
00080   typedef typename Superclass::TranslationValueType TranslationValueType;
00081   typedef typename Superclass::OffsetType           OffsetType;
00082 
00085   typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
00086   typedef typename InverseTransformBaseType::Pointer    InverseTransformBasePointer;
00087 
00094   void SetParameters(const ParametersType & parameters);
00095 
00102   const ParametersType & GetParameters(void) const;
00103 
00108   virtual void ComputeJacobianWithRespectToParameters( const InputPointType  & p, JacobianType & jacobian) const;
00109 
00111   bool GetInverse(Self *inverse) const;
00112 
00114   virtual InverseTransformBasePointer GetInverseTransform() const;
00115 
00116 protected:
00117   CenteredEuler3DTransform();
00118   CenteredEuler3DTransform(const MatrixType & matrix, const OutputPointType & offset);
00119   CenteredEuler3DTransform(unsigned int ParametersDimension);
00120   ~CenteredEuler3DTransform();
00121 
00125   void PrintSelf(std::ostream & os, Indent indent) const;
00126 
00127 private:
00128   CenteredEuler3DTransform(const Self &); // purposely not implemented
00129   void operator=(const Self &);           // purposely not implemented
00130 
00131 };                                        // class CenteredEuler3DTransform
00132 }  // namespace itk
00133 
00134 // Define instantiation macro for this template.
00135 #define ITK_TEMPLATE_CenteredEuler3DTransform(_, EXPORT, TypeX, TypeY)     \
00136   namespace itk                                                            \
00137   {                                                                        \
00138   _( 1 ( class EXPORT CenteredEuler3DTransform<ITK_TEMPLATE_1 TypeX> ) ) \
00139   namespace Templates                                                      \
00140   {                                                                        \
00141   typedef CenteredEuler3DTransform<ITK_TEMPLATE_1 TypeX>                 \
00142   CenteredEuler3DTransform##TypeY;                                       \
00143   }                                                                        \
00144   }
00145 
00146 #if ITK_TEMPLATE_EXPLICIT
00147 #include "Templates/itkCenteredEuler3DTransform+-.h"
00148 #endif
00149 
00150 #if ITK_TEMPLATE_TXX
00151 #include "itkCenteredEuler3DTransform.hxx"
00152 #endif
00153 
00154 #endif /* __itkCenteredEuler3DTransform_h */
00155