00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkCenteredTransformInitializer_h
00019 #define __itkCenteredTransformInitializer_h
00020
00021 #include <iostream>
00022
00023 namespace itk
00024 {
00025
00056 template < class TTransform,
00057 class TFixedImage,
00058 class TMovingImage >
00059 class ITK_EXPORT CenteredTransformInitializer :
00060 public Object
00061 {
00062 public:
00064 typedef CenteredTransformInitializer Self;
00065 typedef Object Superclass;
00066 typedef SmartPointer<Self> Pointer;
00067 typedef SmartPointer<const Self> ConstPointer;
00068
00070 itkNewMacro( Self );
00071
00073 itkTypeMacro( CenteredTransformInitializer, Object );
00074
00076 typedef TTransform TransformType;
00077 typedef typename TransformType::Pointer TransformPointer;
00078
00080 itkStaticConstMacro(SpaceDimension, unsigned int, TransformType::SpaceDimension);
00081 itkStaticConstMacro(InputSpaceDimension, unsigned int, TransformType::InputSpaceDimension);
00082 itkStaticConstMacro(OutputSpaceDimension, unsigned int, TransformType::OutputSpaceDimension);
00083
00084
00086 typedef TFixedImage FixedImageType;
00087 typedef TMovingImage MovingImageType;
00088
00089 typedef typename FixedImageType::ConstPointer FixedImagePointer;
00090 typedef typename MovingImageType::ConstPointer MovingImagePointer;
00091
00092
00093
00095 typedef typename TransformType::OffsetType OffsetType;
00096
00098 typedef typename TransformType::InputPointType InputPointType;
00099
00101 typedef typename TransformType::OutputVectorType OutputVectorType;
00102
00104 itkSetObjectMacro( Transform, TransformType );
00105
00107 itkSetConstObjectMacro( FixedImage, FixedImageType );
00108
00110 itkSetConstObjectMacro( MovingImage, MovingImageType );
00111
00112
00114 void InitializeTransform() const;
00115
00118 void GeometryOn() { m_UseMoments = false; }
00119 void MomentsOn() { m_UseMoments = true; }
00120
00121
00122 protected:
00123 CenteredTransformInitializer() {};
00124 ~CenteredTransformInitializer(){};
00125
00126 void PrintSelf(std::ostream &os, Indent indent) const;
00127
00128 private:
00129 CenteredTransformInitializer(const Self&);
00130 void operator=(const Self&);
00131
00132 TransformPointer m_Transform;
00133
00134 FixedImagePointer m_FixedImage;
00135
00136 MovingImagePointer m_MovingImage;
00137
00138 bool m_UseMoments;
00139
00140 };
00141
00142
00143 }
00144
00145
00146 #ifndef ITK_MANUAL_INSTANTIATION
00147 #include "itkCenteredTransformInitializer.txx"
00148 #endif
00149
00150 #endif