18 #ifndef sitkDiffeomorphicDemonsRegistrationFilter_h
19 #define sitkDiffeomorphicDemonsRegistrationFilter_h
86 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations ( std::vector<double> StandardDeviations ) { this->m_StandardDeviations = std::move(StandardDeviations);
return *
this; }
89 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations(
double value ) { this->m_StandardDeviations = std::vector<double>(3, value);
return *
this; }
98 SITK_RETURN_SELF_TYPE_HEADER
SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations;
return *
this; }
106 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumRMSError (
double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError;
return *
this; }
112 typedef enum {Symmetric,Fixed,
WarpedMoving,MappedMoving} UseGradientTypeType;\
125 SITK_RETURN_SELF_TYPE_HEADER
SetUseFirstOrderExp (
bool UseFirstOrderExp ) { this->m_UseFirstOrderExp = UseFirstOrderExp;
return *
this; }
139 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumUpdateStepLength (
double MaximumUpdateStepLength ) { this->m_MaximumUpdateStepLength = MaximumUpdateStepLength;
return *
this; }
148 SITK_RETURN_SELF_TYPE_HEADER
SetSmoothDisplacementField (
bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField;
return *
this; }
162 SITK_RETURN_SELF_TYPE_HEADER
SetSmoothUpdateField (
bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField;
return *
this; }
176 SITK_RETURN_SELF_TYPE_HEADER
SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations);
return *
this; }
189 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumKernelWidth (
unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth;
return *
this; }
199 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumError (
double MaximumError ) { this->m_MaximumError = MaximumError;
return *
this; }
209 SITK_RETURN_SELF_TYPE_HEADER
SetIntensityDifferenceThreshold (
double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold;
return *
this; }
217 SITK_RETURN_SELF_TYPE_HEADER
SetUseImageSpacing (
bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing;
return *
this; }
250 double GetMetric()
const {
return this->m_pfGetMetric(); };
263 std::string
GetName()
const {
return std::string (
"DiffeomorphicDemonsRegistrationFilter"); }
266 std::string ToString()
const;
271 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const Image & initialDisplacementField );
279 template <
class TImageType>
Image ExecuteInternal (
const Image * fixedImage,
const Image * movingImage,
const Image * initialDisplacementField );
287 std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
290 uint32_t m_NumberOfIterations{10u};
293 double m_MaximumRMSError{0.02};
297 bool m_UseFirstOrderExp{
false};
299 double m_MaximumUpdateStepLength{0.5};
301 bool m_SmoothDisplacementField{
true};
303 bool m_SmoothUpdateField{
false};
305 std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
307 unsigned int m_MaximumKernelWidth{30u};
309 double m_MaximumError{0.1};
311 double m_IntensityDifferenceThreshold{0.001};
313 bool m_UseImageSpacing{
true};
318 double m_RMSChange{0.0};