00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-07-14 19:11:20 +0200 (Tue, 14 Jul 2009) $ 00006 Version: $Revision: 18127 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __itkBSplineDeformableTransformInitializer_h 00019 #define __itkBSplineDeformableTransformInitializer_h 00020 00021 #include "itkObject.h" 00022 #include "itkObjectFactory.h" 00023 00024 #include <iostream> 00025 00026 namespace itk 00027 { 00028 00041 template < class TTransform, class TImage > 00042 class ITK_EXPORT BSplineDeformableTransformInitializer : public Object 00043 { 00044 public: 00046 typedef BSplineDeformableTransformInitializer Self; 00047 typedef Object Superclass; 00048 typedef SmartPointer<Self> Pointer; 00049 typedef SmartPointer<const Self> ConstPointer; 00050 00052 itkNewMacro( Self ); 00053 00055 itkTypeMacro( BSplineDeformableTransformInitializer, Object ); 00056 00058 typedef TTransform TransformType; 00059 00061 typedef typename TransformType::Pointer TransformPointer; 00062 typedef typename TransformType::RegionType TransformRegionType; 00063 typedef typename TransformRegionType::SizeType TransformSizeType; 00064 00065 00067 itkStaticConstMacro(SpaceDimension, unsigned int, 00068 TransformType::InputSpaceDimension); 00069 00071 typedef TImage ImageType; 00072 typedef typename ImageType::ConstPointer ImagePointer; 00073 00074 00076 itkSetObjectMacro( Transform, TransformType ); 00077 00079 itkSetConstObjectMacro( Image, ImageType ); 00080 00084 itkSetMacro( GridSizeInsideTheImage, TransformSizeType ); 00085 00092 void SetNumberOfGridNodesInsideTheImage( unsigned int numberOfNodes ) 00093 { 00094 this->m_GridSizeInsideTheImage.Fill( numberOfNodes ); 00095 this->Modified(); 00096 } 00097 00099 virtual void InitializeTransform() const; 00100 00101 protected: 00102 BSplineDeformableTransformInitializer(); 00103 ~BSplineDeformableTransformInitializer(){}; 00104 00105 void PrintSelf(std::ostream &os, Indent indent) const; 00106 00107 private: 00108 BSplineDeformableTransformInitializer(const Self&); //purposely not implemented 00109 void operator=(const Self&); //purposely not implemented 00110 00111 TransformPointer m_Transform; 00112 00113 ImagePointer m_Image; 00114 00115 TransformSizeType m_GridSizeInsideTheImage; 00116 00117 unsigned int m_NumberOfGridNodesInsideTheImage; 00118 00119 }; //class BSplineDeformableTransformInitializer 00120 00121 00122 } // namespace itk 00123 00124 00125 #ifndef ITK_MANUAL_INSTANTIATION 00126 #include "itkBSplineDeformableTransformInitializer.txx" 00127 #endif 00128 00129 #endif /* __itkBSplineDeformableTransformInitializer_h */