SimpleITK  2.0.0rc2.post21
sitkDiffeomorphicDemonsRegistrationFilter.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 sitkDiffeomorphicDemonsRegistrationFilter_h
19 #define sitkDiffeomorphicDemonsRegistrationFilter_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 {
33  namespace simple {
34 
70  public:
72 
75 
79 
82 \
83 
87  SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations ( std::vector<double> StandardDeviations ) { this->m_StandardDeviations = std::move(StandardDeviations); return *this; }
88 
90  SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); return *this; }
91 
95  std::vector<double> GetStandardDeviations() const { return this->m_StandardDeviations; }\
96 
99  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
100 
103  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
104 
107  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
108 
111  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }
112 
113  typedef enum {Symmetric,Fixed,WarpedMoving,MappedMoving} UseGradientTypeType;\
114 
117  SITK_RETURN_SELF_TYPE_HEADER SetUseGradientType ( UseGradientTypeType UseGradientType ) { this->m_UseGradientType = UseGradientType; return *this; }
118 
121  UseGradientTypeType GetUseGradientType() const { return this->m_UseGradientType; }\
122 
126  SITK_RETURN_SELF_TYPE_HEADER SetUseFirstOrderExp ( bool UseFirstOrderExp ) { this->m_UseFirstOrderExp = UseFirstOrderExp; return *this; }
127 
129  SITK_RETURN_SELF_TYPE_HEADER UseFirstOrderExpOn() { return this->SetUseFirstOrderExp(true); }
130  SITK_RETURN_SELF_TYPE_HEADER UseFirstOrderExpOff() { return this->SetUseFirstOrderExp(false); }
131 
135  bool GetUseFirstOrderExp() const { return this->m_UseFirstOrderExp; }\
136 
140  SITK_RETURN_SELF_TYPE_HEADER SetMaximumUpdateStepLength ( double MaximumUpdateStepLength ) { this->m_MaximumUpdateStepLength = MaximumUpdateStepLength; return *this; }
141 
144  double GetMaximumUpdateStepLength() const { return this->m_MaximumUpdateStepLength; }\
145 
149  SITK_RETURN_SELF_TYPE_HEADER SetSmoothDisplacementField ( bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField; return *this; }
150 
152  SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOn() { return this->SetSmoothDisplacementField(true); }
153  SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOff() { return this->SetSmoothDisplacementField(false); }
154 
158  bool GetSmoothDisplacementField() const { return this->m_SmoothDisplacementField; }\
159 
163  SITK_RETURN_SELF_TYPE_HEADER SetSmoothUpdateField ( bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField; return *this; }
164 
166  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOn() { return this->SetSmoothUpdateField(true); }
167  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOff() { return this->SetSmoothUpdateField(false); }
168 
172  bool GetSmoothUpdateField() const { return this->m_SmoothUpdateField; }\
173 
177  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); return *this; }
178 
180  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); return *this; }
181 
185  std::vector<double> GetUpdateFieldStandardDeviations() const { return this->m_UpdateFieldStandardDeviations; }\
186 
190  SITK_RETURN_SELF_TYPE_HEADER SetMaximumKernelWidth ( unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth; return *this; }
191 
195  unsigned int GetMaximumKernelWidth() const { return this->m_MaximumKernelWidth; }\
196 
200  SITK_RETURN_SELF_TYPE_HEADER SetMaximumError ( double MaximumError ) { this->m_MaximumError = MaximumError; return *this; }
201 
205  double GetMaximumError() const { return this->m_MaximumError; }\
206 
210  SITK_RETURN_SELF_TYPE_HEADER SetIntensityDifferenceThreshold ( double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; return *this; }
211 
214  double GetIntensityDifferenceThreshold() const { return this->m_IntensityDifferenceThreshold; }\
215 
218  SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
219 
221  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
222  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
223 
226  bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
234  uint32_t GetElapsedIterations() const { return this->m_pfGetElapsedIterations(); };
235 
242  double GetRMSChange() const { return this->m_RMSChange; };
243 
251  double GetMetric() const { return this->m_pfGetMetric(); };
252 
253 
255  std::string GetName() const { return std::string ("DiffeomorphicDemonsRegistrationFilter"); }
256 
258  std::string ToString() const;
259 
260 
263  Image Execute ( const Image & fixedImage, const Image & movingImage, const Image & initialDisplacementField );
264  Image Execute ( const Image & fixedImage, const Image & movingImage );
265 
266  private:
267 
270  using MemberFunctionType = Image (Self::*)( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
271  template <class TImageType> Image ExecuteInternal ( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
272 
273 
275 
276  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
277 
278 
279  std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
280 
281  /* Number of iterations to run */
282  uint32_t m_NumberOfIterations{10u};
283 
284  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
285  double m_MaximumRMSError{0.02};
286 
288 
289  bool m_UseFirstOrderExp{false};
290 
291  double m_MaximumUpdateStepLength{0.5};
292 
293  bool m_SmoothDisplacementField{true};
294 
295  bool m_SmoothUpdateField{false};
296 
297  std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
298 
299  unsigned int m_MaximumKernelWidth{30u};
300 
301  double m_MaximumError{0.1};
302 
303  double m_IntensityDifferenceThreshold{0.001};
304 
305  bool m_UseImageSpacing{true};
306 
307 
309 
310  double m_RMSChange{0.0};
311 
312  std::function<double()> m_pfGetMetric;
313 
314  // Holder of process object for active measurements
315  itk::ProcessObject *m_Filter{nullptr};
316 
317  };
318 
319 
320  }
321 }
322 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
itk::simple::DiffeomorphicDemonsRegistrationFilter::MemberFunctionType
Image(Self::*)(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField) MemberFunctionType
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:270
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetSmoothUpdateField
Self & SetSmoothUpdateField(bool SmoothUpdateField)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:163
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseFirstOrderExp
bool GetUseFirstOrderExp() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:135
sitkBasicFilters.h
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:99
itk::simple::DiffeomorphicDemonsRegistrationFilter
Deformably register two images using a diffeomorphic demons algorithm.
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:69
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetSmoothUpdateField
bool GetSmoothUpdateField() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:172
itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothUpdateFieldOff
Self & SmoothUpdateFieldOff()
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:167
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::DiffeomorphicDemonsRegistrationFilter::UseFirstOrderExpOn
Self & UseFirstOrderExpOn()
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:129
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMetric
double GetMetric() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:251
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetName
std::string GetName() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:255
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUpdateFieldStandardDeviations
std::vector< double > GetUpdateFieldStandardDeviations() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:185
itk::simple::DiffeomorphicDemonsRegistrationFilter::UseImageSpacingOn
Self & UseImageSpacingOn()
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:221
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumUpdateStepLength
double GetMaximumUpdateStepLength() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:144
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumError
double GetMaximumError() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:205
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumUpdateStepLength
Self & SetMaximumUpdateStepLength(double MaximumUpdateStepLength)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:140
itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothDisplacementFieldOff
Self & SmoothDisplacementFieldOff()
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:153
itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothUpdateFieldOn
Self & SmoothUpdateFieldOn()
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:166
itk::simple::BasicPixelIDTypeList
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
Definition: sitkPixelIDTypeLists.h:53
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseGradientType
UseGradientTypeType GetUseGradientType() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:121
sitkImageFilter.h
itk::simple::DiffeomorphicDemonsRegistrationFilter::Symmetric
@ Symmetric
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:113
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUpdateFieldStandardDeviations
Self & SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:177
itk::simple::DiffeomorphicDemonsRegistrationFilter::WarpedMoving
@ WarpedMoving
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:113
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:111
itk::simple::DiffeomorphicDemonsRegistrationFilter::UseGradientTypeType
UseGradientTypeType
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:113
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:234
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumKernelWidth
Self & SetMaximumKernelWidth(unsigned int MaximumKernelWidth)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:190
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetUseImageSpacing
bool GetUseImageSpacing() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:226
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetSmoothDisplacementField
bool GetSmoothDisplacementField() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:158
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetMaximumKernelWidth
unsigned int GetMaximumKernelWidth() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:195
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetIntensityDifferenceThreshold
Self & SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:210
itk::simple::DiffeomorphicDemonsRegistrationFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:276
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetStandardDeviations
Self & SetStandardDeviations(double value)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:90
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetRMSChange
double GetRMSChange() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:242
itk::simple::DiffeomorphicDemonsRegistrationFilter::UseImageSpacingOff
Self & UseImageSpacingOff()
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:222
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetSmoothDisplacementField
Self & SetSmoothDisplacementField(bool SmoothDisplacementField)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:149
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumError
Self & SetMaximumError(double MaximumError)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:200
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseGradientType
Self & SetUseGradientType(UseGradientTypeType UseGradientType)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:117
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUpdateFieldStandardDeviations
Self & SetUpdateFieldStandardDeviations(double value)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:180
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetStandardDeviations
Self & SetStandardDeviations(std::vector< double > StandardDeviations)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:87
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetStandardDeviations
std::vector< double > GetStandardDeviations() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:95
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetIntensityDifferenceThreshold
double GetIntensityDifferenceThreshold() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:214
itk
itk::simple::DiffeomorphicDemonsRegistrationFilter::SmoothDisplacementFieldOn
Self & SmoothDisplacementFieldOn()
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:152
itk::ProcessObject
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:107
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
itk::simple::DiffeomorphicDemonsRegistrationFilter::m_pfGetElapsedIterations
std::function< uint32_t()> m_pfGetElapsedIterations
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:308
itk::simple::DiffeomorphicDemonsRegistrationFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:81
itk::uint32_t
::uint32_t uint32_t
itk::simple::DiffeomorphicDemonsRegistrationFilter::m_pfGetMetric
std::function< double()> m_pfGetMetric
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:312
itk::simple::DiffeomorphicDemonsRegistrationFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:103
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseImageSpacing
Self & SetUseImageSpacing(bool UseImageSpacing)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:218
itk::simple::DiffeomorphicDemonsRegistrationFilter::SetUseFirstOrderExp
Self & SetUseFirstOrderExp(bool UseFirstOrderExp)
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:126
itk::simple::DiffeomorphicDemonsRegistrationFilter::UseFirstOrderExpOff
Self & UseFirstOrderExpOff()
Definition: sitkDiffeomorphicDemonsRegistrationFilter.h:130