Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkPDEDeformableRegistrationFilter.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPDEDeformableRegistrationFilter.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:28:37 $ 00007 Version: $Revision: 1.15 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 #ifndef _itkPDEDeformableRegistrationFilter_h_ 00018 #define _itkPDEDeformableRegistrationFilter_h_ 00019 00020 #include "itkDenseFiniteDifferenceImageFilter.h" 00021 #include "itkPDEDeformableRegistrationFunction.h" 00022 00023 namespace itk { 00024 00065 template<class TFixedImage, class TMovingImage, class TDeformationField> 00066 class ITK_EXPORT PDEDeformableRegistrationFilter : 00067 public DenseFiniteDifferenceImageFilter<TDeformationField,TDeformationField> 00068 { 00069 public: 00071 typedef PDEDeformableRegistrationFilter Self; 00072 typedef DenseFiniteDifferenceImageFilter< 00073 TDeformationField,TDeformationField> Superclass; 00074 typedef SmartPointer<Self> Pointer; 00075 typedef SmartPointer<const Self> ConstPointer; 00076 00078 itkNewMacro(Self); 00079 00081 itkTypeMacro( PDEDeformableRegistrationFilter, 00082 DenseFiniteDifferenceImageFilter ); 00083 00085 typedef TFixedImage FixedImageType; 00086 typedef typename FixedImageType::Pointer FixedImagePointer; 00087 typedef typename FixedImageType::ConstPointer FixedImageConstPointer; 00088 00090 typedef TMovingImage MovingImageType; 00091 typedef typename MovingImageType::Pointer MovingImagePointer; 00092 typedef typename MovingImageType::ConstPointer MovingImageConstPointer; 00093 00095 typedef TDeformationField DeformationFieldType; 00096 typedef typename DeformationFieldType::Pointer DeformationFieldPointer; 00097 00099 typedef typename Superclass::OutputImageType OutputImageType; 00100 00102 typedef typename Superclass::FiniteDifferenceFunctionType 00103 FiniteDifferenceFunctionType; 00104 00106 typedef PDEDeformableRegistrationFunction<FixedImageType,MovingImageType, 00107 DeformationFieldType> PDEDeformableRegistrationFunctionType; 00108 00110 itkStaticConstMacro(ImageDimension, unsigned int, 00111 Superclass::ImageDimension); 00112 00114 void SetFixedImage( const FixedImageType * ptr ); 00115 00117 const FixedImageType * GetFixedImage(void); 00118 00120 void SetMovingImage( const MovingImageType * ptr ); 00121 00123 const MovingImageType * GetMovingImage(void); 00124 00126 void SetInitialDeformationField( DeformationFieldType * ptr ) 00127 { this->SetInput( ptr ); } 00128 00130 DeformationFieldType * GetDeformationField() 00131 { return this->GetOutput(); } 00132 00134 itkSetMacro(NumberOfIterations, unsigned int); 00135 00137 itkGetMacro(NumberOfIterations, unsigned int); 00138 00141 itkSetVectorMacro( StandardDeviations, double, ImageDimension ); 00142 virtual void SetStandardDeviations( double value ); 00143 00145 const double * GetStandardDeviations(void) 00146 { return (double *) m_StandardDeviations; } 00147 00148 protected: 00149 PDEDeformableRegistrationFilter(); 00150 ~PDEDeformableRegistrationFilter() {} 00151 void PrintSelf(std::ostream& os, Indent indent) const; 00152 00155 virtual bool Halt() 00156 { 00157 if (this->GetElapsedIterations() == m_NumberOfIterations) return true; 00158 else return false; 00159 } 00160 00163 virtual void CopyInputToOutput(); 00164 00167 virtual void InitializeIteration(); 00168 00172 virtual void SmoothDeformationField(); 00173 00176 virtual void CopyDeformationField( DeformationFieldType * input, 00177 DeformationFieldType * output ); 00178 00183 virtual void GenerateOutputInformation(); 00184 00191 virtual void GenerateInputRequestedRegion(); 00192 00193 private: 00194 PDEDeformableRegistrationFilter(const Self&); //purposely not implemented 00195 void operator=(const Self&); //purposely not implemented 00196 00198 unsigned int m_NumberOfIterations; 00199 00201 double m_StandardDeviations[ImageDimension]; 00202 00205 DeformationFieldPointer m_TempField; 00206 00208 double m_MaximumError; 00209 00210 }; 00211 00212 00213 } // end namespace itk 00214 00215 #ifndef ITK_MANUAL_INSTANTIATION 00216 #include "itkPDEDeformableRegistrationFilter.txx" 00217 #endif 00218 00219 #endif

Generated at Sat Mar 31 02:27:11 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000