ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkCenteredRigid2DTransform.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 __itkCenteredRigid2DTransform_h
00019 #define __itkCenteredRigid2DTransform_h
00020 
00021 #include <iostream>
00022 #include "itkRigid2DTransform.h"
00023 
00024 namespace itk
00025 {
00051 template <class TScalarType = double>
00052 // Data type for scalars
00053 class ITK_EXPORT CenteredRigid2DTransform :
00054   public Rigid2DTransform<TScalarType>
00055 {
00056 public:
00058   typedef CenteredRigid2DTransform      Self;
00059   typedef Rigid2DTransform<TScalarType> Superclass;
00060   typedef SmartPointer<Self>            Pointer;
00061   typedef SmartPointer<const Self>      ConstPointer;
00062 
00064   itkNewMacro(Self);
00065 
00067   itkTypeMacro(CenteredRigid2DTransform, Rigid2DTransform);
00068 
00070   itkStaticConstMacro(SpaceDimension, unsigned int, 2);
00071   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 2);
00072   itkStaticConstMacro(ParametersDimension, unsigned int, 5);
00074 
00076   typedef typename Superclass::ScalarType ScalarType;
00077 
00079   typedef typename Superclass::ParametersType      ParametersType;
00080   typedef typename Superclass::ParametersValueType ParametersValueType;
00081 
00083   typedef typename Superclass::JacobianType JacobianType;
00084 
00086   typedef typename Superclass::OffsetType OffsetType;
00087 
00089   typedef typename Superclass::InputPointType      InputPointType;
00090   typedef typename Superclass::OutputPointType     OutputPointType;
00091   typedef typename Superclass::InputPointValueType InputPointValueType;
00092 
00094   typedef typename Superclass::InputVectorType       InputVectorType;
00095   typedef typename Superclass::OutputVectorType      OutputVectorType;
00096   typedef typename Superclass::OutputVectorValueType OutputVectorValueType;
00097 
00099   typedef typename Superclass::InputCovariantVectorType
00100   InputCovariantVectorType;
00101   typedef typename Superclass::OutputCovariantVectorType
00102   OutputCovariantVectorType;
00103 
00105   typedef typename Superclass::InputVnlVectorType  InputVnlVectorType;
00106   typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00107 
00110   typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
00111   typedef typename InverseTransformBaseType::Pointer    InverseTransformBasePointer;
00112 
00121   void SetParameters(const ParametersType & parameters);
00122 
00131   const ParametersType & GetParameters(void) const;
00132 
00136   virtual void ComputeJacobianWithRespectToParameters( const InputPointType  & p, JacobianType & jacobian) const;
00137 
00140   virtual void SetFixedParameters(const ParametersType &);
00141 
00144   virtual const ParametersType & GetFixedParameters(void) const;
00145 
00149   void CloneInverseTo(Pointer & newinverse) const;
00150 
00152   bool GetInverse(Self *inverse) const;
00153 
00155   virtual InverseTransformBasePointer GetInverseTransform() const;
00156 
00160   void CloneTo(Pointer & clone) const;
00161 
00162 protected:
00163   CenteredRigid2DTransform();
00164   ~CenteredRigid2DTransform()
00165   {
00166   }
00167 
00168   CenteredRigid2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension);
00169 
00170   void PrintSelf(std::ostream & os, Indent indent) const;
00171 
00172 private:
00173   CenteredRigid2DTransform(const Self &); // purposely not implemented
00174   void operator=(const Self &);           // purposely not implemented
00175 
00176 };                                        // class CenteredRigid2DTransform
00177 }  // namespace itk
00178 
00179 // Define instantiation macro for this template.
00180 #define ITK_TEMPLATE_CenteredRigid2DTransform(_, EXPORT, TypeX, TypeY)     \
00181   namespace itk                                                            \
00182   {                                                                        \
00183   _( 1 ( class EXPORT CenteredRigid2DTransform<ITK_TEMPLATE_1 TypeX> ) ) \
00184   namespace Templates                                                      \
00185   {                                                                        \
00186   typedef CenteredRigid2DTransform<ITK_TEMPLATE_1 TypeX>                 \
00187   CenteredRigid2DTransform##TypeY;                                       \
00188   }                                                                        \
00189   }
00190 
00191 #if ITK_TEMPLATE_EXPLICIT
00192 #include "Templates/itkCenteredRigid2DTransform+-.h"
00193 #endif
00194 
00195 #if ITK_TEMPLATE_TXX
00196 #include "itkCenteredRigid2DTransform.hxx"
00197 #endif
00198 
00199 #endif /* __itkCenteredRigid2DTransform_h */
00200