18 #ifndef sitkDemonsRegistrationFilter_h
19 #define sitkDemonsRegistrationFilter_h
77 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations (
const std::vector<double> & StandardDeviations ) { this->m_StandardDeviations = StandardDeviations;
return *
this; }
80 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations(
double value ) { this->m_StandardDeviations = std::vector<double>(3, value);
return *
this; }
98 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumRMSError (
double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError;
return *
this; }
107 SITK_RETURN_SELF_TYPE_HEADER
SetUseMovingImageGradient (
bool UseMovingImageGradient ) { this->m_UseMovingImageGradient = UseMovingImageGradient;
return *
this; }
121 SITK_RETURN_SELF_TYPE_HEADER
SetSmoothDisplacementField (
bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField;
return *
this; }
135 SITK_RETURN_SELF_TYPE_HEADER
SetSmoothUpdateField (
bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField;
return *
this; }
149 SITK_RETURN_SELF_TYPE_HEADER
SetUpdateFieldStandardDeviations (
const std::vector<double> & UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = UpdateFieldStandardDeviations;
return *
this; }
163 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumKernelWidth (
unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth;
return *
this; }
173 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumError (
double MaximumError ) { this->m_MaximumError = MaximumError;
return *
this; }
183 SITK_RETURN_SELF_TYPE_HEADER
SetIntensityDifferenceThreshold (
double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold;
return *
this; }
191 SITK_RETURN_SELF_TYPE_HEADER
SetUseImageSpacing (
bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing;
return *
this; }
224 double GetMetric()
const {
return this->m_pfGetMetric(); };
227 std::string
GetName()
const {
return std::string (
"DemonsRegistrationFilter"); }
230 std::string ToString()
const;
234 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const Image & initialDisplacementField );
239 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const Image & initialDisplacementField,
const std::vector<double> & standardDeviations,
uint32_t numberOfIterations,
double maximumRMSError,
bool useMovingImageGradient,
bool smoothDisplacementField,
bool smoothUpdateField,
const std::vector<double> & updateFieldStandardDeviations,
unsigned int maximumKernelWidth,
double maximumError,
double intensityDifferenceThreshold,
bool useImageSpacing );
240 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const std::vector<double> & standardDeviations,
uint32_t numberOfIterations,
double maximumRMSError,
bool useMovingImageGradient,
bool smoothDisplacementField,
bool smoothUpdateField,
const std::vector<double> & updateFieldStandardDeviations,
unsigned int maximumKernelWidth,
double maximumError,
double intensityDifferenceThreshold,
bool useImageSpacing );
246 typedef Image (Self::*MemberFunctionType)(
const Image * fixedImage,
const Image * movingImage,
const Image * initialDisplacementField );
247 template <
class TImageType>
Image ExecuteInternal (
const Image * fixedImage,
const Image * movingImage,
const Image * initialDisplacementField );
Self & SetUpdateFieldStandardDeviations(const std::vector< double > &UpdateFieldStandardDeviations)
Self & SetMaximumKernelWidth(unsigned int MaximumKernelWidth)
Self & SetMaximumError(double MaximumError)
std::vector< double > GetStandardDeviations() const
Self & SetSmoothUpdateField(bool SmoothUpdateField)
#define SITKBasicFilters_EXPORT
std::vector< double > GetUpdateFieldStandardDeviations() const
Self & SetStandardDeviations(double value)
BasicPixelIDTypeList PixelIDTypeList
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
Self & UseImageSpacingOff()
Self & SetMaximumRMSError(double MaximumRMSError)
std::vector< double > m_UpdateFieldStandardDeviations
bool GetSmoothUpdateField() const
Self & SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
Deformably register two images using the demons algorithm.
double GetMaximumError() const
double m_IntensityDifferenceThreshold
bool m_UseMovingImageGradient
Self & SmoothDisplacementFieldOff()
Self & SmoothUpdateFieldOn()
uint32_t GetNumberOfIterations() const
uint32_t m_NumberOfIterations
Self & UseImageSpacingOn()
Self & UseMovingImageGradientOn()
double GetIntensityDifferenceThreshold() const
Self & UseMovingImageGradientOff()
std::vector< double > m_StandardDeviations
nsstd::function< double()> m_pfGetMetric
Self & SmoothDisplacementFieldOn()
Self & SetUseImageSpacing(bool UseImageSpacing)
Self & SetUseMovingImageGradient(bool UseMovingImageGradient)
Self & SetStandardDeviations(const std::vector< double > &StandardDeviations)
Self & SetUpdateFieldStandardDeviations(double value)
The Image class for SimpleITK.
uint32_t GetElapsedIterations() const
Number of iterations run.
Self & SetSmoothDisplacementField(bool SmoothDisplacementField)
bool GetSmoothDisplacementField() const
unsigned int m_MaximumKernelWidth
nsstd::function< uint32_t()> m_pfGetElapsedIterations
bool GetUseImageSpacing() const
itk::ProcessObject * m_Filter
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
std::string GetName() const
Self & SmoothUpdateFieldOff()
DemonsRegistrationFilter Self
bool m_SmoothDisplacementField
double GetMaximumRMSError() const
The base interface for SimpleITK filters that take one input image.
unsigned int GetMaximumKernelWidth() const
bool GetUseMovingImageGradient() const
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory