17 #ifndef __itkSymmetricForcesDemonsRegistrationFilter_txx
18 #define __itkSymmetricForcesDemonsRegistrationFilter_txx
26 template <
class TFixedImage,
class TMovingImage,
class TDeformationField>
32 drfp = DemonsRegistrationFunctionType::New();
34 this->SetDifferenceFunction( static_cast<FiniteDifferenceFunctionType *>(
43 template <
class TFixedImage,
class TMovingImage,
class TDeformationField>
53 (this->GetDifferenceFunction().GetPointer());
57 itkExceptionMacro(<<
"FiniteDifferenceFunction not of type DemonsRegistrationFunctionType");
65 Superclass::InitializeIteration();
70 if ( this->GetSmoothDeformationField() )
72 this->SmoothDeformationField();
81 template <
class TFixedImage,
class TMovingImage,
class TDeformationField>
89 (this->GetDifferenceFunction().GetPointer());
94 "Could not cast difference function to SymmetricForcesDemonsRegistrationFunction" );
103 template <
class TFixedImage,
class TMovingImage,
class TDeformationField>
111 (this->GetDifferenceFunction().GetPointer());
115 itkExceptionMacro( <<
116 "Could not cast difference function to DemonsRegistrationFunction" );
126 template <
class TFixedImage,
class TMovingImage,
class TDeformationField>
134 (this->GetDifferenceFunction().GetPointer());
138 itkExceptionMacro( <<
139 "Could not cast difference function to SymmetricDemonsRegistrationFunction" );
149 template <
class TFixedImage,
class TMovingImage,
class TDeformationField>
157 (this->GetDifferenceFunction().GetPointer());
161 itkExceptionMacro( <<
162 "Could not cast difference function to SymmetricForcesDemonsRegistrationFunction" );
173 template <
class TFixedImage,
class TMovingImage,
class TDeformationField>
180 if ( this->GetSmoothUpdateField() )
182 this->SmoothUpdateField();
185 this->Superclass::ApplyUpdate(dt);
189 (this->GetDifferenceFunction().GetPointer());
193 itkExceptionMacro( <<
194 "Could not cast difference function to DemonsRegistrationFunction" );
201 template <
class TFixedImage,
class TMovingImage,
class TDeformationField>
206 Superclass::PrintSelf( os, indent );
207 os << indent <<
"Intensity difference threshold: " <<
208 this->GetIntensityDifferenceThreshold() << std::endl;