ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkCenteredSimilarity2DTransform.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 __itkCenteredSimilarity2DTransform_h
00019 #define __itkCenteredSimilarity2DTransform_h
00020 
00021 #include <iostream>
00022 #include "itkSimilarity2DTransform.h"
00023 
00024 namespace itk
00025 {
00055 template <class TScalarType = double>
00056 // Data type for scalars
00057 class ITK_EXPORT CenteredSimilarity2DTransform :
00058   public Similarity2DTransform<TScalarType>
00059 {
00060 public:
00062   typedef CenteredSimilarity2DTransform      Self;
00063   typedef Similarity2DTransform<TScalarType> Superclass;
00064   typedef SmartPointer<Self>                 Pointer;
00065   typedef SmartPointer<const Self>           ConstPointer;
00066 
00068   itkNewMacro(Self);
00069 
00071   itkTypeMacro(CenteredSimilarity2DTransform, Similarity2DTransform);
00072 
00074   itkStaticConstMacro(SpaceDimension,           unsigned int, 2);
00075   itkStaticConstMacro(InputSpaceDimension,      unsigned int, 2);
00076   itkStaticConstMacro(OutputSpaceDimension,     unsigned int, 2);
00077   itkStaticConstMacro(ParametersDimension,      unsigned int, 6);
00079 
00081   typedef typename Superclass::ScalarType ScalarType;
00082 
00084   typedef typename Superclass::ParametersType      ParametersType;
00085   typedef typename Superclass::ParametersValueType ParametersValueType;
00086 
00088   typedef typename Superclass::JacobianType JacobianType;
00089 
00091   typedef typename Superclass::OffsetType      OffsetType;
00092   typedef typename Superclass::OffsetValueType OffsetValueType;
00093 
00095   typedef typename Superclass::InputPointType  InputPointType;
00096   typedef typename Superclass::OutputPointType OutputPointType;
00097   typedef typename InputPointType::ValueType   InputPointValueType;
00098 
00100   typedef typename Superclass::InputVectorType  InputVectorType;
00101   typedef typename Superclass::OutputVectorType OutputVectorType;
00102 
00104   typedef typename Superclass::InputCovariantVectorType
00105   InputCovariantVectorType;
00106   typedef typename Superclass::OutputCovariantVectorType
00107   OutputCovariantVectorType;
00108 
00110   typedef typename Superclass::InputVnlVectorType  InputVnlVectorType;
00111   typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00112 
00115   typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
00116   typedef typename InverseTransformBaseType::Pointer    InverseTransformBasePointer;
00117 
00127   void SetParameters(const ParametersType & parameters);
00128 
00138   const ParametersType & GetParameters(void) const;
00139 
00141   virtual void ComputeJacobianWithRespectToParameters( const InputPointType  & p, JacobianType & jacobian) const;
00142 
00145   virtual void SetFixedParameters(const ParametersType &);
00146 
00149   virtual const ParametersType & GetFixedParameters(void) const;
00150 
00154   void CloneInverseTo(Pointer & newinverse) const;
00155 
00157   bool GetInverse(Self *inverse) const;
00158 
00160   virtual InverseTransformBasePointer GetInverseTransform() const;
00161 
00165   void CloneTo(Pointer & clone) const;
00166 
00167 protected:
00168   CenteredSimilarity2DTransform();
00169   CenteredSimilarity2DTransform(unsigned int spaceDimension, unsigned int parametersDimension);
00170 
00171   ~CenteredSimilarity2DTransform()
00172   {
00173   }
00174   void PrintSelf(std::ostream & os, Indent indent) const;
00175 
00176 private:
00177   CenteredSimilarity2DTransform(const Self &); // purposely not implemented
00178   void operator=(const Self &);                // purposely not implemented
00179 
00180 };                                             // class
00181                                                // CenteredSimilarity2DTransform
00182 }  // namespace itk
00183 
00184 // Define instantiation macro for this template.
00185 #define ITK_TEMPLATE_CenteredSimilarity2DTransform(_, EXPORT, TypeX, TypeY)     \
00186   namespace itk                                                                 \
00187   {                                                                             \
00188   _( 1 ( class EXPORT CenteredSimilarity2DTransform<ITK_TEMPLATE_1 TypeX> ) ) \
00189   namespace Templates                                                           \
00190   {                                                                             \
00191   typedef CenteredSimilarity2DTransform<ITK_TEMPLATE_1 TypeX>                 \
00192   CenteredSimilarity2DTransform##TypeY;                                       \
00193   }                                                                             \
00194   }
00195 
00196 #if ITK_TEMPLATE_EXPLICIT
00197 #include "Templates/itkCenteredSimilarity2DTransform+-.h"
00198 #endif
00199 
00200 #if ITK_TEMPLATE_TXX
00201 #include "itkCenteredSimilarity2DTransform.hxx"
00202 #endif
00203 
00204 #endif /* __itkCenteredSimilarity2DTransform_h */
00205