SimpleITK  
sitkSymmetricForcesDemonsRegistrationFilter.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 sitkSymmetricForcesDemonsRegistrationFilter_h
19 #define sitkSymmetricForcesDemonsRegistrationFilter_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 
113  SITK_RETURN_SELF_TYPE_HEADER SetSmoothDisplacementField ( bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField; return *this; }
114 
116  SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOn() { return this->SetSmoothDisplacementField(true); }
117  SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOff() { return this->SetSmoothDisplacementField(false); }
118 
122  bool GetSmoothDisplacementField() const { return this->m_SmoothDisplacementField; }\
123 
127  SITK_RETURN_SELF_TYPE_HEADER SetSmoothUpdateField ( bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField; return *this; }
128 
130  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOn() { return this->SetSmoothUpdateField(true); }
131  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOff() { return this->SetSmoothUpdateField(false); }
132 
136  bool GetSmoothUpdateField() const { return this->m_SmoothUpdateField; }\
137 
141  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); return *this; }
142 
144  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); return *this; }
145 
149  std::vector<double> GetUpdateFieldStandardDeviations() const { return this->m_UpdateFieldStandardDeviations; }\
150 
154  SITK_RETURN_SELF_TYPE_HEADER SetMaximumKernelWidth ( unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth; return *this; }
155 
159  unsigned int GetMaximumKernelWidth() const { return this->m_MaximumKernelWidth; }\
160 
164  SITK_RETURN_SELF_TYPE_HEADER SetMaximumError ( double MaximumError ) { this->m_MaximumError = MaximumError; return *this; }
165 
169  double GetMaximumError() const { return this->m_MaximumError; }\
170 
174  SITK_RETURN_SELF_TYPE_HEADER SetIntensityDifferenceThreshold ( double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; return *this; }
175 
178  double GetIntensityDifferenceThreshold() const { return this->m_IntensityDifferenceThreshold; }\
179 
182  SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
183 
185  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
186  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
187 
190  bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
198  uint32_t GetElapsedIterations() const { return this->m_pfGetElapsedIterations(); };
199 
206  double GetRMSChange() const { return this->m_RMSChange; };
207 
215  double GetMetric() const { return this->m_pfGetMetric(); };
216 
224  void StopRegistration() { return this->m_pfGetStopRegistration(); };
225 
226 
228  std::string GetName() const { return std::string ("SymmetricForcesDemonsRegistrationFilter"); }
229 
231  std::string ToString() const;
232 
233 
236  Image Execute ( const Image & fixedImage, const Image & movingImage, const Image & initialDisplacementField );
237  Image Execute ( const Image & fixedImage, const Image & movingImage );
238 
239  private:
240 
243  using MemberFunctionType = Image (Self::*)( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
244  template <class TImageType> Image ExecuteInternal ( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
245 
246 
248 
249  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
250 
251 
252  std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
253 
254  /* Number of iterations to run */
255  uint32_t m_NumberOfIterations{10u};
256 
257  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
258  double m_MaximumRMSError{0.02};
259 
260  bool m_SmoothDisplacementField{true};
261 
262  bool m_SmoothUpdateField{false};
263 
264  std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
265 
266  unsigned int m_MaximumKernelWidth{30u};
267 
268  double m_MaximumError{0.1};
269 
270  double m_IntensityDifferenceThreshold{0.001};
271 
272  bool m_UseImageSpacing{true};
273 
274 
275  std::function<uint32_t()> m_pfGetElapsedIterations;
276 
277  double m_RMSChange{0.0};
278 
279  std::function<double()> m_pfGetMetric;
280 
281  std::function<void()> m_pfGetStopRegistration;
282 
283  // Holder of process object for active measurements
284  itk::ProcessObject *m_Filter{nullptr};
285 
286  };
287 
288 
289 }
290 #endif
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetIntensityDifferenceThreshold
Self & SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:174
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
sitkBasicFilters.h
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetMaximumKernelWidth
Self & SetMaximumKernelWidth(unsigned int MaximumKernelWidth)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:154
itk::simple::SymmetricForcesDemonsRegistrationFilter::m_pfGetMetric
std::function< double()> m_pfGetMetric
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:279
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:108
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetMaximumError
double GetMaximumError() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:169
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetUpdateFieldStandardDeviations
std::vector< double > GetUpdateFieldStandardDeviations() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:149
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetSmoothUpdateField
Self & SetSmoothUpdateField(bool SmoothUpdateField)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:127
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:100
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:29
itk::simple::SymmetricForcesDemonsRegistrationFilter::UseImageSpacingOff
Self & UseImageSpacingOff()
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:186
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetUpdateFieldStandardDeviations
Self & SetUpdateFieldStandardDeviations(double value)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:144
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::SymmetricForcesDemonsRegistrationFilter::SmoothUpdateFieldOff
Self & SmoothUpdateFieldOff()
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:131
itk::simple::SymmetricForcesDemonsRegistrationFilter
Deformably register two images using the demons algorithm.
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:66
sitkImageFilter.h
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetSmoothUpdateField
bool GetSmoothUpdateField() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:136
itk::simple::SymmetricForcesDemonsRegistrationFilter::StopRegistration
void StopRegistration()
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:224
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetName
std::string GetName() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:228
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetMaximumKernelWidth
unsigned int GetMaximumKernelWidth() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:159
itk::simple::SymmetricForcesDemonsRegistrationFilter::m_pfGetStopRegistration
std::function< void()> m_pfGetStopRegistration
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:281
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:198
itk::simple::SymmetricForcesDemonsRegistrationFilter::SmoothUpdateFieldOn
Self & SmoothUpdateFieldOn()
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:130
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetMaximumError
Self & SetMaximumError(double MaximumError)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:164
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetRMSChange
double GetRMSChange() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:206
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetUseImageSpacing
Self & SetUseImageSpacing(bool UseImageSpacing)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:182
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetSmoothDisplacementField
Self & SetSmoothDisplacementField(bool SmoothDisplacementField)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:113
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetStandardDeviations
Self & SetStandardDeviations(std::vector< double > StandardDeviations)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:84
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetUpdateFieldStandardDeviations
Self & SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:141
itk::simple::SymmetricForcesDemonsRegistrationFilter::UseImageSpacingOn
Self & UseImageSpacingOn()
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:185
itk::simple::SymmetricForcesDemonsRegistrationFilter::SmoothDisplacementFieldOff
Self & SmoothDisplacementFieldOff()
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:117
itk::simple::SymmetricForcesDemonsRegistrationFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:249
itk::simple::SymmetricForcesDemonsRegistrationFilter::SmoothDisplacementFieldOn
Self & SmoothDisplacementFieldOn()
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:116
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetMetric
double GetMetric() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:215
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetSmoothDisplacementField
bool GetSmoothDisplacementField() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:122
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetIntensityDifferenceThreshold
double GetIntensityDifferenceThreshold() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:178
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetStandardDeviations
std::vector< double > GetStandardDeviations() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:92
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:104
itk::simple::SymmetricForcesDemonsRegistrationFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:78
itk::simple::SymmetricForcesDemonsRegistrationFilter::GetUseImageSpacing
bool GetUseImageSpacing() const
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:190
itk::ProcessObject
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:35
itk::simple::SymmetricForcesDemonsRegistrationFilter::MemberFunctionType
Image(Self::*)(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField) MemberFunctionType
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:243
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:96
itk::simple::SymmetricForcesDemonsRegistrationFilter::m_pfGetElapsedIterations
std::function< uint32_t()> m_pfGetElapsedIterations
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:275
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::SymmetricForcesDemonsRegistrationFilter::SetStandardDeviations
Self & SetStandardDeviations(double value)
Definition: sitkSymmetricForcesDemonsRegistrationFilter.h:87