00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _itkDemonsRegistrationFilter_h_
00018 #define _itkDemonsRegistrationFilter_h_
00019
00020 #include "itkPDEDeformableRegistrationFilter.h"
00021 #include "itkDemonsRegistrationFunction.h"
00022
00023 namespace itk {
00024
00060 template<class TFixedImage, class TMovingImage, class TDeformationField>
00061 class ITK_EXPORT DemonsRegistrationFilter :
00062 public PDEDeformableRegistrationFilter< TFixedImage, TMovingImage,
00063 TDeformationField>
00064 {
00065 public:
00067 typedef DemonsRegistrationFilter Self;
00068 typedef PDEDeformableRegistrationFilter<
00069 TFixedImage, TMovingImage,TDeformationField> Superclass;
00070 typedef SmartPointer<Self> Pointer;
00071 typedef SmartPointer<const Self> ConstPointer;
00072
00074 itkNewMacro(Self);
00075
00077 itkTypeMacro( DemonsRegistrationFilter,
00078 PDEDeformableRegistrationFilter );
00079
00081 typedef typename Superclass::TimeStepType TimeStepType;
00082
00084 typedef typename Superclass::FixedImageType FixedImageType;
00085 typedef typename Superclass::FixedImagePointer FixedImagePointer;
00086
00088 typedef typename Superclass::MovingImageType MovingImageType;
00089 typedef typename Superclass::MovingImagePointer MovingImagePointer;
00090
00092 typedef typename Superclass::DeformationFieldType
00093 DeformationFieldType;
00094 typedef typename Superclass::DeformationFieldPointer
00095 DeformationFieldPointer;
00096
00098 typedef typename Superclass::FiniteDifferenceFunctionType
00099 FiniteDifferenceFunctionType;
00100
00102 typedef DemonsRegistrationFunction<FixedImageType,MovingImageType,
00103 DeformationFieldType> DemonsRegistrationFunctionType;
00104
00110 virtual double GetMetric() const;
00111
00114 itkSetMacro( UseMovingImageGradient, bool );
00115 itkGetMacro( UseMovingImageGradient, bool );
00116 itkBooleanMacro( UseMovingImageGradient );
00117
00122 virtual void SetIntensityDifferenceThreshold(double);
00123 virtual double GetIntensityDifferenceThreshold() const;
00124
00125 protected:
00126 DemonsRegistrationFilter();
00127 ~DemonsRegistrationFilter() {}
00128 void PrintSelf(std::ostream& os, Indent indent) const;
00129
00131 virtual void InitializeIteration();
00132
00134 virtual void ApplyUpdate(TimeStepType dt);
00135
00136 private:
00137 DemonsRegistrationFilter(const Self&);
00138 void operator=(const Self&);
00139
00140 bool m_UseMovingImageGradient;
00141
00142 };
00143
00144
00145 }
00146
00147 #ifndef ITK_MANUAL_INSTANTIATION
00148 #include "itkDemonsRegistrationFilter.txx"
00149 #endif
00150
00151 #endif