SimpleITK  2.0.0rc2.post21
sitkLevelSetMotionRegistrationFilter.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 sitkLevelSetMotionRegistrationFilter_h
19 #define sitkLevelSetMotionRegistrationFilter_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 
65  public:
67 
70 
74 
77 \
78 
82  SITK_RETURN_SELF_TYPE_HEADER SetGradientSmoothingStandardDeviations ( double GradientSmoothingStandardDeviations ) { this->m_GradientSmoothingStandardDeviations = GradientSmoothingStandardDeviations; return *this; }
83 
86  double GetGradientSmoothingStandardDeviations() const { return this->m_GradientSmoothingStandardDeviations; }\
87 
90  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
91 
94  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
95 
98  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
99 
102  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }\
103 
107  SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations ( std::vector<double> StandardDeviations ) { this->m_StandardDeviations = std::move(StandardDeviations); return *this; }
108 
110  SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); return *this; }
111 
115  std::vector<double> GetStandardDeviations() const { return this->m_StandardDeviations; }\
116 
120  SITK_RETURN_SELF_TYPE_HEADER SetSmoothDisplacementField ( bool SmoothDisplacementField ) { this->m_SmoothDisplacementField = SmoothDisplacementField; return *this; }
121 
123  SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOn() { return this->SetSmoothDisplacementField(true); }
124  SITK_RETURN_SELF_TYPE_HEADER SmoothDisplacementFieldOff() { return this->SetSmoothDisplacementField(false); }
125 
129  bool GetSmoothDisplacementField() const { return this->m_SmoothDisplacementField; }\
130 
134  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations ( std::vector<double> UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = std::move(UpdateFieldStandardDeviations); return *this; }
135 
137  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); return *this; }
138 
142  std::vector<double> GetUpdateFieldStandardDeviations() const { return this->m_UpdateFieldStandardDeviations; }\
143 
147  SITK_RETURN_SELF_TYPE_HEADER SetSmoothUpdateField ( bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField; return *this; }
148 
150  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOn() { return this->SetSmoothUpdateField(true); }
151  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOff() { return this->SetSmoothUpdateField(false); }
152 
156  bool GetSmoothUpdateField() const { return this->m_SmoothUpdateField; }\
157 
161  SITK_RETURN_SELF_TYPE_HEADER SetMaximumKernelWidth ( unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth; return *this; }
162 
166  unsigned int GetMaximumKernelWidth() const { return this->m_MaximumKernelWidth; }\
167 
171  SITK_RETURN_SELF_TYPE_HEADER SetMaximumError ( double MaximumError ) { this->m_MaximumError = MaximumError; return *this; }
172 
176  double GetMaximumError() const { return this->m_MaximumError; }\
177 
181  SITK_RETURN_SELF_TYPE_HEADER SetAlpha ( double Alpha ) { this->m_Alpha = Alpha; return *this; }
182 
185  double GetAlpha() const { return this->m_Alpha; }\
186 
190  SITK_RETURN_SELF_TYPE_HEADER SetIntensityDifferenceThreshold ( double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; return *this; }
191 
194  double GetIntensityDifferenceThreshold() const { return this->m_IntensityDifferenceThreshold; }\
195 
199  SITK_RETURN_SELF_TYPE_HEADER SetGradientMagnitudeThreshold ( double GradientMagnitudeThreshold ) { this->m_GradientMagnitudeThreshold = GradientMagnitudeThreshold; return *this; }
200 
203  double GetGradientMagnitudeThreshold() const { return this->m_GradientMagnitudeThreshold; }\
204 
207  SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
208 
210  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
211  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
212 
215  bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
222  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
223 
230  double GetRMSChange() const { return this->m_RMSChange; };
231 
238  double GetMetric() const { return this->m_Metric; };
239 
240 
242  std::string GetName() const { return std::string ("LevelSetMotionRegistrationFilter"); }
243 
245  std::string ToString() const;
246 
247 
250  Image Execute ( const Image & fixedImage, const Image & movingImage, const Image & initialDisplacementField );
251  Image Execute ( const Image & fixedImage, const Image & movingImage );
252 
253  private:
254 
257  using MemberFunctionType = Image (Self::*)( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
258  template <class TImageType> Image ExecuteInternal ( const Image * fixedImage, const Image * movingImage, const Image * initialDisplacementField );
259 
260 
262 
263  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
264 
265 
266  double m_GradientSmoothingStandardDeviations{1.0};
267 
268  /* Number of iterations to run */
269  uint32_t m_NumberOfIterations{10u};
270 
271  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
272  double m_MaximumRMSError{0.02};
273 
274  std::vector<double> m_StandardDeviations{std::vector<double>(3, 1.0)};
275 
276  bool m_SmoothDisplacementField{false};
277 
278  std::vector<double> m_UpdateFieldStandardDeviations{std::vector<double>(3, 1.0)};
279 
280  bool m_SmoothUpdateField{false};
281 
282  unsigned int m_MaximumKernelWidth{30u};
283 
284  double m_MaximumError{0.1};
285 
286  double m_Alpha{0.1};
287 
288  double m_IntensityDifferenceThreshold{0.001};
289 
290  double m_GradientMagnitudeThreshold{1e-9};
291 
292  bool m_UseImageSpacing{true};
293 
294 
295  uint32_t m_ElapsedIterations{0};
296 
297  double m_RMSChange{0.0};
298 
299  double m_Metric{0.0};
300 
301 
302  };
303 
304 
305  }
306 }
307 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
itk::simple::LevelSetMotionRegistrationFilter::GetGradientSmoothingStandardDeviations
double GetGradientSmoothingStandardDeviations() const
Definition: sitkLevelSetMotionRegistrationFilter.h:86
sitkBasicFilters.h
itk::simple::LevelSetMotionRegistrationFilter::SmoothDisplacementFieldOn
Self & SmoothDisplacementFieldOn()
Definition: sitkLevelSetMotionRegistrationFilter.h:123
itk::simple::LevelSetMotionRegistrationFilter::SetIntensityDifferenceThreshold
Self & SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
Definition: sitkLevelSetMotionRegistrationFilter.h:190
itk::simple::LevelSetMotionRegistrationFilter::SetUpdateFieldStandardDeviations
Self & SetUpdateFieldStandardDeviations(std::vector< double > UpdateFieldStandardDeviations)
Definition: sitkLevelSetMotionRegistrationFilter.h:134
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::LevelSetMotionRegistrationFilter::UseImageSpacingOff
Self & UseImageSpacingOff()
Definition: sitkLevelSetMotionRegistrationFilter.h:211
itk::simple::LevelSetMotionRegistrationFilter::SetAlpha
Self & SetAlpha(double Alpha)
Definition: sitkLevelSetMotionRegistrationFilter.h:181
itk::simple::LevelSetMotionRegistrationFilter::GetSmoothUpdateField
bool GetSmoothUpdateField() const
Definition: sitkLevelSetMotionRegistrationFilter.h:156
itk::simple::LevelSetMotionRegistrationFilter::SetMaximumKernelWidth
Self & SetMaximumKernelWidth(unsigned int MaximumKernelWidth)
Definition: sitkLevelSetMotionRegistrationFilter.h:161
itk::simple::LevelSetMotionRegistrationFilter::GetName
std::string GetName() const
Definition: sitkLevelSetMotionRegistrationFilter.h:242
itk::simple::LevelSetMotionRegistrationFilter::GetMetric
double GetMetric() const
Definition: sitkLevelSetMotionRegistrationFilter.h:238
itk::simple::LevelSetMotionRegistrationFilter::GetSmoothDisplacementField
bool GetSmoothDisplacementField() const
Definition: sitkLevelSetMotionRegistrationFilter.h:129
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::LevelSetMotionRegistrationFilter::GetMaximumError
double GetMaximumError() const
Definition: sitkLevelSetMotionRegistrationFilter.h:176
itk::simple::LevelSetMotionRegistrationFilter::SetUpdateFieldStandardDeviations
Self & SetUpdateFieldStandardDeviations(double value)
Definition: sitkLevelSetMotionRegistrationFilter.h:137
itk::simple::LevelSetMotionRegistrationFilter::SmoothUpdateFieldOn
Self & SmoothUpdateFieldOn()
Definition: sitkLevelSetMotionRegistrationFilter.h:150
sitkImageFilter.h
itk::simple::LevelSetMotionRegistrationFilter::SetSmoothDisplacementField
Self & SetSmoothDisplacementField(bool SmoothDisplacementField)
Definition: sitkLevelSetMotionRegistrationFilter.h:120
itk::simple::LevelSetMotionRegistrationFilter::SetStandardDeviations
Self & SetStandardDeviations(double value)
Definition: sitkLevelSetMotionRegistrationFilter.h:110
itk::simple::LevelSetMotionRegistrationFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkLevelSetMotionRegistrationFilter.h:76
itk::simple::LevelSetMotionRegistrationFilter::SetStandardDeviations
Self & SetStandardDeviations(std::vector< double > StandardDeviations)
Definition: sitkLevelSetMotionRegistrationFilter.h:107
itk::simple::LevelSetMotionRegistrationFilter
Deformably register two images using level set motion.
Definition: sitkLevelSetMotionRegistrationFilter.h:64
itk::simple::LevelSetMotionRegistrationFilter::GetRMSChange
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Definition: sitkLevelSetMotionRegistrationFilter.h:230
itk::simple::LevelSetMotionRegistrationFilter::GetStandardDeviations
std::vector< double > GetStandardDeviations() const
Definition: sitkLevelSetMotionRegistrationFilter.h:115
itk::simple::LevelSetMotionRegistrationFilter::GetAlpha
double GetAlpha() const
Definition: sitkLevelSetMotionRegistrationFilter.h:185
itk::simple::LevelSetMotionRegistrationFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkLevelSetMotionRegistrationFilter.h:94
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::LevelSetMotionRegistrationFilter::SetUseImageSpacing
Self & SetUseImageSpacing(bool UseImageSpacing)
Definition: sitkLevelSetMotionRegistrationFilter.h:207
itk::simple::LevelSetMotionRegistrationFilter::GetUpdateFieldStandardDeviations
std::vector< double > GetUpdateFieldStandardDeviations() const
Definition: sitkLevelSetMotionRegistrationFilter.h:142
itk::simple::LevelSetMotionRegistrationFilter::SetGradientMagnitudeThreshold
Self & SetGradientMagnitudeThreshold(double GradientMagnitudeThreshold)
Definition: sitkLevelSetMotionRegistrationFilter.h:199
itk::simple::LevelSetMotionRegistrationFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkLevelSetMotionRegistrationFilter.h:222
itk::simple::LevelSetMotionRegistrationFilter::SmoothDisplacementFieldOff
Self & SmoothDisplacementFieldOff()
Definition: sitkLevelSetMotionRegistrationFilter.h:124
itk
itk::simple::LevelSetMotionRegistrationFilter::SetGradientSmoothingStandardDeviations
Self & SetGradientSmoothingStandardDeviations(double GradientSmoothingStandardDeviations)
Definition: sitkLevelSetMotionRegistrationFilter.h:82
itk::simple::LevelSetMotionRegistrationFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkLevelSetMotionRegistrationFilter.h:98
itk::simple::LevelSetMotionRegistrationFilter::GetMaximumKernelWidth
unsigned int GetMaximumKernelWidth() const
Definition: sitkLevelSetMotionRegistrationFilter.h:166
itk::simple::LevelSetMotionRegistrationFilter::MemberFunctionType
Image(Self::*)(const Image *fixedImage, const Image *movingImage, const Image *initialDisplacementField) MemberFunctionType
Definition: sitkLevelSetMotionRegistrationFilter.h:257
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
itk::simple::LevelSetMotionRegistrationFilter::GetIntensityDifferenceThreshold
double GetIntensityDifferenceThreshold() const
Definition: sitkLevelSetMotionRegistrationFilter.h:194
itk::simple::LevelSetMotionRegistrationFilter::SmoothUpdateFieldOff
Self & SmoothUpdateFieldOff()
Definition: sitkLevelSetMotionRegistrationFilter.h:151
itk::simple::LevelSetMotionRegistrationFilter::GetGradientMagnitudeThreshold
double GetGradientMagnitudeThreshold() const
Definition: sitkLevelSetMotionRegistrationFilter.h:203
itk::simple::LevelSetMotionRegistrationFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkLevelSetMotionRegistrationFilter.h:263
itk::simple::LevelSetMotionRegistrationFilter::SetSmoothUpdateField
Self & SetSmoothUpdateField(bool SmoothUpdateField)
Definition: sitkLevelSetMotionRegistrationFilter.h:147
itk::uint32_t
::uint32_t uint32_t
itk::simple::LevelSetMotionRegistrationFilter::SetMaximumError
Self & SetMaximumError(double MaximumError)
Definition: sitkLevelSetMotionRegistrationFilter.h:171
itk::simple::LevelSetMotionRegistrationFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkLevelSetMotionRegistrationFilter.h:102
itk::simple::LevelSetMotionRegistrationFilter::GetUseImageSpacing
bool GetUseImageSpacing() const
Definition: sitkLevelSetMotionRegistrationFilter.h:215
itk::simple::LevelSetMotionRegistrationFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkLevelSetMotionRegistrationFilter.h:90
itk::simple::LevelSetMotionRegistrationFilter::UseImageSpacingOn
Self & UseImageSpacingOn()
Definition: sitkLevelSetMotionRegistrationFilter.h:210