18 #ifndef sitkDemonsRegistrationFilter_h
19 #define sitkDemonsRegistrationFilter_h
76 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations ( std::vector<double> StandardDeviations ) { this->m_StandardDeviations = std::move(StandardDeviations);
return *
this; }
79 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations(
double value ) { this->m_StandardDeviations = std::vector<double>(3, value);
return *
this; }
88 SITK_RETURN_SELF_TYPE_HEADER
SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations;
return *
this; }
96 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumRMSError (
double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError;
return *
this; }
105 SITK_RETURN_SELF_TYPE_HEADER
SetUseMovingImageGradient (
bool UseMovingImageGradient ) { this->m_UseMovingImageGradient = UseMovingImageGradient;
return *
this; }
119 SITK_RETURN_SELF_TYPE_HEADER
SetSmoothDisplacementField (
bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField;
return *
this; }
133 SITK_RETURN_SELF_TYPE_HEADER
SetSmoothUpdateField (
bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField;
return *
this; }
147 SITK_RETURN_SELF_TYPE_HEADER
SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations);
return *
this; }
160 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumKernelWidth (
unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth;
return *
this; }
170 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumError (
double MaximumError ) { this->m_MaximumError = MaximumError;
return *
this; }
180 SITK_RETURN_SELF_TYPE_HEADER
SetIntensityDifferenceThreshold (
double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold;
return *
this; }
188 SITK_RETURN_SELF_TYPE_HEADER
SetUseImageSpacing (
bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing;
return *
this; }
221 double GetMetric()
const {
return this->m_pfGetMetric(); };
234 std::string
GetName()
const {
return std::string (
"DemonsRegistrationFilter"); }
237 std::string ToString()
const;
242 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const Image & initialDisplacementField );
250 template <
class TImageType>
Image ExecuteInternal (
const Image * fixedImage,
const Image * movingImage,
const Image * initialDisplacementField );
258 std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
261 uint32_t m_NumberOfIterations{10u};
264 double m_MaximumRMSError{0.02};
266 bool m_UseMovingImageGradient{
false};
268 bool m_SmoothDisplacementField{
true};
270 bool m_SmoothUpdateField{
false};
272 std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
274 unsigned int m_MaximumKernelWidth{30u};
276 double m_MaximumError{0.1};
278 double m_IntensityDifferenceThreshold{0.001};
280 bool m_UseImageSpacing{
true};
285 double m_RMSChange{0.0};