18 #ifndef sitkDiffeomorphicDemonsRegistrationFilter_h
19 #define sitkDiffeomorphicDemonsRegistrationFilter_h
85 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations (
const std::vector<double> & StandardDeviations ) { this->m_StandardDeviations = StandardDeviations;
return *
this; }
88 SITK_RETURN_SELF_TYPE_HEADER
SetStandardDeviations(
double value ) { this->m_StandardDeviations = std::vector<double>(3, value);
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 (
const std::vector<double> & UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = UpdateFieldStandardDeviations;
return *
this; }
190 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumKernelWidth (
unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth;
return *
this; }
200 SITK_RETURN_SELF_TYPE_HEADER
SetMaximumError (
double MaximumError ) { this->m_MaximumError = MaximumError;
return *
this; }
210 SITK_RETURN_SELF_TYPE_HEADER
SetIntensityDifferenceThreshold (
double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold;
return *
this; }
218 SITK_RETURN_SELF_TYPE_HEADER
SetUseImageSpacing (
bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing;
return *
this; }
251 double GetMetric()
const {
return this->m_pfGetMetric(); };
254 std::string
GetName()
const {
return std::string (
"DiffeomorphicDemonsRegistrationFilter"); }
257 std::string ToString()
const;
261 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const Image & initialDisplacementField );
266 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const Image & initialDisplacementField,
const std::vector<double> & standardDeviations,
uint32_t numberOfIterations,
double maximumRMSError,
DiffeomorphicDemonsRegistrationFilter::UseGradientTypeType useGradientType,
bool useFirstOrderExp,
double maximumUpdateStepLength,
bool smoothDisplacementField,
bool smoothUpdateField,
const std::vector<double> & updateFieldStandardDeviations,
unsigned int maximumKernelWidth,
double maximumError,
double intensityDifferenceThreshold,
bool useImageSpacing );
267 Image Execute (
const Image & fixedImage,
const Image & movingImage,
const std::vector<double> & standardDeviations,
uint32_t numberOfIterations,
double maximumRMSError,
DiffeomorphicDemonsRegistrationFilter::UseGradientTypeType useGradientType,
bool useFirstOrderExp,
double maximumUpdateStepLength,
bool smoothDisplacementField,
bool smoothUpdateField,
const std::vector<double> & updateFieldStandardDeviations,
unsigned int maximumKernelWidth,
double maximumError,
double intensityDifferenceThreshold,
bool useImageSpacing );
273 typedef Image (Self::*MemberFunctionType)(
const Image * fixedImage,
const Image * movingImage,
const Image * initialDisplacementField );
274 template <
class TImageType>
Image ExecuteInternal (
const Image * fixedImage,
const Image * movingImage,
const Image * initialDisplacementField );
std::string GetName() const
Self & SetSmoothUpdateField(bool SmoothUpdateField)
Self & UseImageSpacingOff()
#define SITKBasicFilters_EXPORT
bool GetUseFirstOrderExp() const
double m_IntensityDifferenceThreshold
bool GetSmoothUpdateField() const
Deformably register two images using a diffeomorphic demons algorithm.
UseGradientTypeType m_UseGradientType
double GetMaximumError() const
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 & SetMaximumError(double MaximumError)
UseGradientTypeType GetUseGradientType() const
double GetRMSChange() const
Self & SetMaximumRMSError(double MaximumRMSError)
std::vector< double > GetUpdateFieldStandardDeviations() const
Self & SetStandardDeviations(const std::vector< double > &StandardDeviations)
Self & SmoothDisplacementFieldOn()
Self & SmoothUpdateFieldOff()
unsigned int GetMaximumKernelWidth() const
Self & UseImageSpacingOn()
Self & SetMaximumUpdateStepLength(double MaximumUpdateStepLength)
Self & SetUpdateFieldStandardDeviations(double value)
bool GetUseImageSpacing() const
double GetMaximumUpdateStepLength() const
Self & UseFirstOrderExpOff()
uint32_t m_NumberOfIterations
bool GetSmoothDisplacementField() const
Self & SetStandardDeviations(double value)
unsigned int m_MaximumKernelWidth
Self & SetSmoothDisplacementField(bool SmoothDisplacementField)
Self & SmoothDisplacementFieldOff()
bool m_SmoothDisplacementField
uint32_t GetElapsedIterations() const
Number of iterations run.
Self & UseFirstOrderExpOn()
The Image class for SimpleITK.
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
double m_MaximumUpdateStepLength
Self & SetMaximumKernelWidth(unsigned int MaximumKernelWidth)
Self & SetUseFirstOrderExp(bool UseFirstOrderExp)
Self & SmoothUpdateFieldOn()
Self & SetUpdateFieldStandardDeviations(const std::vector< double > &UpdateFieldStandardDeviations)
std::vector< double > m_UpdateFieldStandardDeviations
BasicPixelIDTypeList PixelIDTypeList
Self & SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
Self & SetUseImageSpacing(bool UseImageSpacing)
nsstd::function< uint32_t()> m_pfGetElapsedIterations
uint32_t GetNumberOfIterations() const
std::vector< double > m_StandardDeviations
nsstd::function< double()> m_pfGetMetric
double GetMaximumRMSError() const
The base interface for SimpleITK filters that take one input image.
itk::ProcessObject * m_Filter
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
DiffeomorphicDemonsRegistrationFilter Self
std::vector< double > GetStandardDeviations() const
double GetIntensityDifferenceThreshold() const
Self & SetUseGradientType(UseGradientTypeType UseGradientType)