ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkCenteredVersorTransformInitializer.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 __itkCenteredVersorTransformInitializer_h
00019 #define __itkCenteredVersorTransformInitializer_h
00020 
00021 #include "itkCenteredTransformInitializer.h"
00022 #include "itkVersorRigid3DTransform.h"
00023 
00024 namespace itk
00025 {
00039 template< class TFixedImage,
00040           class TMovingImage >
00041 class ITK_EXPORT CenteredVersorTransformInitializer:
00042   public CenteredTransformInitializer<
00043     VersorRigid3DTransform< double >,
00044     TFixedImage, TMovingImage >
00045 {
00046 public:
00048   typedef CenteredVersorTransformInitializer Self;
00049   typedef CenteredTransformInitializer<
00050     VersorRigid3DTransform< double >,
00051     TFixedImage, TMovingImage >          Superclass;
00052 
00053   typedef SmartPointer< Self >       Pointer;
00054   typedef SmartPointer< const Self > ConstPointer;
00055 
00057   itkNewMacro(Self);
00058 
00060   itkTypeMacro(CenteredVersorTransformInitializer, Object);
00061 
00063   typedef typename Superclass::TransformType    TransformType;
00064   typedef typename Superclass::TransformPointer TransformPointer;
00065 
00067   itkStaticConstMacro(InputSpaceDimension, unsigned int,
00068                       Superclass::InputSpaceDimension);
00069   itkStaticConstMacro(OutputSpaceDimension, unsigned int,
00070                       Superclass::OutputSpaceDimension);
00072 
00074   typedef   typename Superclass::FixedImageType  FixedImageType;
00075   typedef   typename Superclass::MovingImageType MovingImageType;
00076 
00077   typedef   typename Superclass::FixedImagePointer  FixedImagePointer;
00078   typedef   typename Superclass::MovingImagePointer MovingImagePointer;
00079 
00081   typedef typename Superclass::OffsetType OffsetType;
00082 
00084   typedef typename Superclass::InputPointType InputPointType;
00085 
00087   typedef typename Superclass::OutputVectorType OutputVectorType;
00088 
00090   void InitializeTransform();
00091 
00094   itkSetMacro(ComputeRotation, bool);
00095   itkGetMacro(ComputeRotation, bool);
00096   itkBooleanMacro(ComputeRotation);
00097 protected:
00098   CenteredVersorTransformInitializer();
00099   ~CenteredVersorTransformInitializer(){}
00101 
00102   void PrintSelf(std::ostream & os, Indent indent) const;
00103 
00104 private:
00105   CenteredVersorTransformInitializer(const Self &); //purposely not implemented
00106   void operator=(const Self &);                     //purposely not implemented
00107 
00108   bool m_ComputeRotation;
00109 }; //class CenteredVersorTransformInitializer
00110 }  // namespace itk
00111 
00112 // Define instantiation macro for this template.
00113 #define ITK_TEMPLATE_CenteredVersorTransformInitializer(_, EXPORT, TypeX, TypeY)     \
00114   namespace itk                                                                      \
00115   {                                                                                  \
00116   _( 2 ( class EXPORT CenteredVersorTransformInitializer< ITK_TEMPLATE_2 TypeX > ) ) \
00117   namespace Templates                                                                \
00118   {                                                                                  \
00119   typedef CenteredVersorTransformInitializer< ITK_TEMPLATE_2 TypeX >                 \
00120   CenteredVersorTransformInitializer##TypeY;                                       \
00121   }                                                                                  \
00122   }
00123 
00124 #if ITK_TEMPLATE_EXPLICIT
00125 #include "Templates/itkCenteredVersorTransformInitializer+-.h"
00126 #endif
00127 
00128 #if ITK_TEMPLATE_TXX
00129 #include "itkCenteredVersorTransformInitializer.hxx"
00130 #endif
00131 
00132 #endif /* __itkCenteredVersorTransformInitializer_h */
00133