ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkVersorRigid3DTransform.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 __itkVersorRigid3DTransform_h
00019 #define __itkVersorRigid3DTransform_h
00020 
00021 #include <iostream>
00022 #include "itkVersorTransform.h"
00023 
00024 namespace itk
00025 {
00045 template <class TScalarType = double>
00046 // Data type for scalars (float or double)
00047 class ITK_EXPORT VersorRigid3DTransform :
00048   public VersorTransform<TScalarType>
00049 {
00050 public:
00052   typedef VersorRigid3DTransform       Self;
00053   typedef VersorTransform<TScalarType> Superclass;
00054   typedef SmartPointer<Self>           Pointer;
00055   typedef SmartPointer<const Self>     ConstPointer;
00056 
00058   itkNewMacro(Self);
00059 
00061   itkTypeMacro(VersorRigid3DTransform, VersorTransform);
00062 
00064   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00065   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00066   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00067   itkStaticConstMacro(ParametersDimension, unsigned int, 6);
00069 
00071   typedef typename Superclass::ParametersType            ParametersType;
00072   typedef typename Superclass::JacobianType              JacobianType;
00073   typedef typename Superclass::ScalarType                ScalarType;
00074   typedef typename Superclass::InputPointType            InputPointType;
00075   typedef typename Superclass::OutputPointType           OutputPointType;
00076   typedef typename Superclass::InputVectorType           InputVectorType;
00077   typedef typename Superclass::OutputVectorType          OutputVectorType;
00078   typedef typename Superclass::InputVnlVectorType        InputVnlVectorType;
00079   typedef typename Superclass::OutputVnlVectorType       OutputVnlVectorType;
00080   typedef typename Superclass::InputCovariantVectorType  InputCovariantVectorType;
00081   typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00082   typedef typename Superclass::MatrixType                MatrixType;
00083   typedef typename Superclass::InverseMatrixType         InverseMatrixType;
00084   typedef typename Superclass::CenterType                CenterType;
00085   typedef typename Superclass::OffsetType                OffsetType;
00086   typedef typename Superclass::TranslationType           TranslationType;
00087 
00089   typedef typename Superclass::VersorType VersorType;
00090   typedef typename Superclass::AxisType   AxisType;
00091   typedef typename Superclass::AngleType  AngleType;
00092 
00093   typedef typename Superclass::AxisValueType        AxisValueType;
00094   typedef typename Superclass::TranslationValueType TranslationValueType;
00095   typedef typename Superclass::ParameterValueType   ParameterValueType;
00096 
00101   void SetParameters(const ParametersType & parameters);
00102 
00103   virtual const ParametersType & GetParameters(void) const;
00104 
00109   virtual void ComputeJacobianWithRespectToParameters( const InputPointType  & p, JacobianType & jacobian) const;
00110 
00111 protected:
00112   VersorRigid3DTransform(const MatrixType & matrix, const OutputVectorType & offset);
00113   VersorRigid3DTransform(unsigned int paramDim);
00114   VersorRigid3DTransform();
00115   ~VersorRigid3DTransform()
00116   {
00117   }
00118 
00119   void PrintSelf(std::ostream & os, Indent indent) const;
00120 
00121 private:
00122   VersorRigid3DTransform(const Self &); // purposely not implemented
00123   void operator=(const Self &);         // purposely not implemented
00124 
00125 };                                      // class VersorRigid3DTransform
00126 }  // namespace itk
00127 
00128 // Define instantiation macro for this template.
00129 #define ITK_TEMPLATE_VersorRigid3DTransform(_, EXPORT, TypeX, TypeY)                      \
00130   namespace itk                                                                           \
00131   {                                                                                       \
00132   _( 1 ( class EXPORT VersorRigid3DTransform<ITK_TEMPLATE_1 TypeX> ) )                  \
00133   namespace Templates                                                                     \
00134   {                                                                                       \
00135   typedef VersorRigid3DTransform<ITK_TEMPLATE_1 TypeX> VersorRigid3DTransform##TypeY; \
00136   }                                                                                       \
00137   }
00138 
00139 #if ITK_TEMPLATE_EXPLICIT
00140 #include "Templates/itkVersorRigid3DTransform+-.h"
00141 #endif
00142 
00143 #if ITK_TEMPLATE_TXX
00144 #include "itkVersorRigid3DTransform.hxx"
00145 #endif
00146 
00147 #endif /* __itkVersorRigid3DTransform_h */
00148