SimpleITK  
sitkFastSymmetricForcesDemonsRegistrationFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitkFastSymmetricForcesDemonsRegistrationFilter_h
19 #define sitkFastSymmetricForcesDemonsRegistrationFilter_h
20 
21 /*
22  * WARNING: DO NOT EDIT THIS FILE!
23  * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24  * Please look at sitkImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkBasicFilters.h"
30 #include "sitkImageFilter.h"
31 
32 namespace itk::simple {
33 
67  public:
69 
72 
76 
79 \
80 
84  SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations ( std::vector<double> StandardDeviations ) { this->m_StandardDeviations = std::move(StandardDeviations); return *this; }
85 
87  SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); return *this; }
88 
92  std::vector<double> GetStandardDeviations() const { return this->m_StandardDeviations; }\
93 
96  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
97 
100  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
101 
104  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
105 
108  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }
109 
110  typedef enum {Symmetric,Fixed,WarpedMoving,MappedMoving} UseGradientTypeType;\
111 
114  SITK_RETURN_SELF_TYPE_HEADER SetUseGradientType ( UseGradientTypeType UseGradientType ) { this->m_UseGradientType = UseGradientType; return *this; }
115 
118  UseGradientTypeType GetUseGradientType() const { return this->m_UseGradientType; }\
119 
123  SITK_RETURN_SELF_TYPE_HEADER SetMaximumUpdateStepLength ( double MaximumUpdateStepLength ) { this->m_MaximumUpdateStepLength = MaximumUpdateStepLength; return *this; }
124 
127  double GetMaximumUpdateStepLength() const { return this->m_MaximumUpdateStepLength; }\
128 
132  SITK_RETURN_SELF_TYPE_HEADER SetSmoothDisplacementField ( bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField; return *this; }
133 
135  SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOn() { return this->SetSmoothDisplacementField(true); }
136  SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOff() { return this->SetSmoothDisplacementField(false); }
137 
141  bool GetSmoothDisplacementField() const { return this->m_SmoothDisplacementField; }\
142 
146  SITK_RETURN_SELF_TYPE_HEADER SetSmoothUpdateField ( bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField; return *this; }
147 
149  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOn() { return this->SetSmoothUpdateField(true); }
150  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOff() { return this->SetSmoothUpdateField(false); }
151 
155  bool GetSmoothUpdateField() const { return this->m_SmoothUpdateField; }\
156 
160  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); return *this; }
161 
163  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); return *this; }
164 
168  std::vector<double> GetUpdateFieldStandardDeviations() const { return this->m_UpdateFieldStandardDeviations; }\
169 
173  SITK_RETURN_SELF_TYPE_HEADER SetMaximumKernelWidth ( unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth; return *this; }
174 
178  unsigned int GetMaximumKernelWidth() const { return this->m_MaximumKernelWidth; }\
179 
183  SITK_RETURN_SELF_TYPE_HEADER SetMaximumError ( double MaximumError ) { this->m_MaximumError = MaximumError; return *this; }
184 
188  double GetMaximumError() const { return this->m_MaximumError; }\
189 
193  SITK_RETURN_SELF_TYPE_HEADER SetIntensityDifferenceThreshold ( double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; return *this; }
194 
197  double GetIntensityDifferenceThreshold() const { return this->m_IntensityDifferenceThreshold; }\
198 
201  SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
202 
204  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
205  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
206 
209  bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
217  uint32_t GetElapsedIterations() const { return this->m_pfGetElapsedIterations(); };
218 
225  double GetRMSChange() const { return this->m_RMSChange; };
226 
234  double GetMetric() const { return this->m_pfGetMetric(); };
235 
243  void StopRegistration() { return this->m_pfGetStopRegistration(); };
244 
245 
247  std::string GetName() const { return std::string ("FastSymmetricForcesDemonsRegistrationFilter"); }
248 
250  std::string ToString() const;
251 
252 
255  Image Execute ( const Image & fixedImage, const Image & movingImage, const Image & initialDisplacementField );
256  Image Execute ( const Image & fixedImage, const Image & movingImage );
257 
258  private:
259 
262  using MemberFunctionType = Image (Self::*)( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
263  template <class TImageType> Image ExecuteInternal ( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
264 
265 
267 
268  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
269 
270 
271  std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
272 
273  /* Number of iterations to run */
274  uint32_t m_NumberOfIterations{10u};
275 
276  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
277  double m_MaximumRMSError{0.02};
278 
280 
281  double m_MaximumUpdateStepLength{0.5};
282 
283  bool m_SmoothDisplacementField{true};
284 
285  bool m_SmoothUpdateField{false};
286 
287  std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
288 
289  unsigned int m_MaximumKernelWidth{30u};
290 
291  double m_MaximumError{0.1};
292 
293  double m_IntensityDifferenceThreshold{0.001};
294 
295  bool m_UseImageSpacing{true};
296 
297 
298  std::function<uint32_t()> m_pfGetElapsedIterations;
299 
300  double m_RMSChange{0.0};
301 
302  std::function<double()> m_pfGetMetric;
303 
304  std::function<void()> m_pfGetStopRegistration;
305 
306  // Holder of process object for active measurements
307  itk::ProcessObject *m_Filter{nullptr};
308 
309  };
310 
311 
312 }
313 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
itk::simple::FastSymmetricForcesDemonsRegistrationFilter
Deformably register two images using a symmetric forces demons algorithm.
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:66
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::m_pfGetStopRegistration
std::function< void()> m_pfGetStopRegistration
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:304
sitkBasicFilters.h
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetMaximumError
Self & SetMaximumError(double MaximumError)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:183
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:108
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetMaximumUpdateStepLength
Self & SetMaximumUpdateStepLength(double MaximumUpdateStepLength)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:123
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:268
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetSmoothUpdateField
bool GetSmoothUpdateField() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:155
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:29
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::MemberFunctionType
Image(Self::*)(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField) MemberFunctionType
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:262
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::UseGradientTypeType
UseGradientTypeType
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:110
itk::simple::BasicPixelIDTypeList
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > > BasicPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:51
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::Symmetric
@ Symmetric
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:110
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:96
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetIntensityDifferenceThreshold
Self & SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:193
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetMaximumKernelWidth
unsigned int GetMaximumKernelWidth() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:178
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetSmoothDisplacementField
bool GetSmoothDisplacementField() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:141
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetUpdateFieldStandardDeviations
Self & SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:160
sitkImageFilter.h
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetIntensityDifferenceThreshold
double GetIntensityDifferenceThreshold() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:197
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetMetric
double GetMetric() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:234
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetUseGradientType
UseGradientTypeType GetUseGradientType() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:118
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetMaximumUpdateStepLength
double GetMaximumUpdateStepLength() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:127
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SmoothDisplacementFieldOn
Self & SmoothDisplacementFieldOn()
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:135
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetUpdateFieldStandardDeviations
std::vector< double > GetUpdateFieldStandardDeviations() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:168
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetSmoothDisplacementField
Self & SetSmoothDisplacementField(bool SmoothDisplacementField)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:132
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:78
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SmoothUpdateFieldOff
Self & SmoothUpdateFieldOff()
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:150
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetStandardDeviations
Self & SetStandardDeviations(double value)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:87
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:104
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetSmoothUpdateField
Self & SetSmoothUpdateField(bool SmoothUpdateField)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:146
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetUpdateFieldStandardDeviations
Self & SetUpdateFieldStandardDeviations(double value)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:163
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::WarpedMoving
@ WarpedMoving
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:110
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetName
std::string GetName() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:247
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::m_pfGetMetric
std::function< double()> m_pfGetMetric
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:302
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetUseGradientType
Self & SetUseGradientType(UseGradientTypeType UseGradientType)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:114
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetMaximumKernelWidth
Self & SetMaximumKernelWidth(unsigned int MaximumKernelWidth)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:173
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::UseImageSpacingOn
Self & UseImageSpacingOn()
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:204
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::StopRegistration
void StopRegistration()
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:243
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetStandardDeviations
std::vector< double > GetStandardDeviations() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:92
itk::ProcessObject
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:35
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::m_pfGetElapsedIterations
std::function< uint32_t()> m_pfGetElapsedIterations
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:298
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetMaximumError
double GetMaximumError() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:188
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::UseImageSpacingOff
Self & UseImageSpacingOff()
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:205
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:217
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SmoothUpdateFieldOn
Self & SmoothUpdateFieldOn()
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:149
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetRMSChange
double GetRMSChange() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:225
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetUseImageSpacing
bool GetUseImageSpacing() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:209
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetUseImageSpacing
Self & SetUseImageSpacing(bool UseImageSpacing)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:201
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:100
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SetStandardDeviations
Self & SetStandardDeviations(std::vector< double > StandardDeviations)
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:84
itk::simple::FastSymmetricForcesDemonsRegistrationFilter::SmoothDisplacementFieldOff
Self & SmoothDisplacementFieldOff()
Definition: sitkFastSymmetricForcesDemonsRegistrationFilter.h:136