18 #ifndef sitkLevelSetMotionRegistrationFilter_h
19 #define sitkLevelSetMotionRegistrationFilter_h
83 SITK_RETURN_SELF_TYPE_HEADER
SetGradientSmoothingStandardDeviations (
double GradientSmoothingStandardDeviations ) { this->m_GradientSmoothingStandardDeviations = GradientSmoothingStandardDeviations;
return *
this; }
91 SITK_RETURN_SELF_TYPE_HEADER
SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations;
return *
this; }
99 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumRMSError (
double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError;
return *
this; }
108 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations ( std::vector<double> StandardDeviations ) { this->m_StandardDeviations = std::move(StandardDeviations);
return *
this; }
111 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations(
double value ) { this->m_StandardDeviations = std::vector<double>(3, value);
return *
this; }
121 SITK_RETURN_SELF_TYPE_HEADER
SetSmoothDisplacementField (
bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField;
return *
this; }
135 SITK_RETURN_SELF_TYPE_HEADER
SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations);
return *
this; }
148 SITK_RETURN_SELF_TYPE_HEADER
SetSmoothUpdateField (
bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField;
return *
this; }
162 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumKernelWidth (
unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth;
return *
this; }
172 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumError (
double MaximumError ) { this->m_MaximumError = MaximumError;
return *
this; }
182 SITK_RETURN_SELF_TYPE_HEADER
SetAlpha (
double Alpha ) { this->m_Alpha = Alpha;
return *
this; }
191 SITK_RETURN_SELF_TYPE_HEADER
SetIntensityDifferenceThreshold (
double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold;
return *
this; }
200 SITK_RETURN_SELF_TYPE_HEADER
SetGradientMagnitudeThreshold (
double GradientMagnitudeThreshold ) { this->m_GradientMagnitudeThreshold = GradientMagnitudeThreshold;
return *
this; }
208 SITK_RETURN_SELF_TYPE_HEADER
SetUseImageSpacing (
bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing;
return *
this; }
243 std::string
GetName()
const {
return std::string (
"LevelSetMotionRegistrationFilter"); }
246 std::string ToString()
const;
251 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const Image & initialDisplacementField );
259 template <
class TImageType>
Image ExecuteInternal (
const Image * fixedImage,
const Image * movingImage,
const Image * initialDisplacementField );
267 double m_GradientSmoothingStandardDeviations{1.0};
270 uint32_t m_NumberOfIterations{10u};
273 double m_MaximumRMSError{0.02};
275 std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
277 bool m_SmoothDisplacementField{
false};
279 std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
281 bool m_SmoothUpdateField{
false};
283 unsigned int m_MaximumKernelWidth{30u};
285 double m_MaximumError{0.1};
289 double m_IntensityDifferenceThreshold{0.001};
291 double m_GradientMagnitudeThreshold{1e-9};
293 bool m_UseImageSpacing{
true};
296 uint32_t m_ElapsedIterations{0};
298 double m_RMSChange{0.0};
300 double m_Metric{0.0};