SimpleITK  1.0.1
sitkLevelSetMotionRegistrationFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
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 
63  public:
65 
69 
72 
75 
76 
77 
81  SITK_RETURN_SELF_TYPE_HEADER SetGradientSmoothingStandardDeviations ( double GradientSmoothingStandardDeviations ) { this->m_GradientSmoothingStandardDeviations = GradientSmoothingStandardDeviations; return *this; }
82 
85  double GetGradientSmoothingStandardDeviations() const { return this->m_GradientSmoothingStandardDeviations; }
86 
89  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
90 
93  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }
94 
97  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
98 
101  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }
102 
106  SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations ( const std::vector<double> & StandardDeviations ) { this->m_StandardDeviations = StandardDeviations; return *this; }
107 
109  SITK_RETURN_SELF_TYPE_HEADER SetStandardDeviations( double value ) { this->m_StandardDeviations = std::vector<double>(3, value); return *this; }
110 
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 ( const std::vector<double> & UpdateFieldStandardDeviations ) { this->m_UpdateFieldStandardDeviations = UpdateFieldStandardDeviations; return *this; }
135 
137  SITK_RETURN_SELF_TYPE_HEADER SetUpdateFieldStandardDeviations( double value ) { this->m_UpdateFieldStandardDeviations = std::vector<double>(3, value); return *this; }
138 
139 
143  std::vector<double> GetUpdateFieldStandardDeviations() const { return this->m_UpdateFieldStandardDeviations; }
144 
148  SITK_RETURN_SELF_TYPE_HEADER SetSmoothUpdateField ( bool SmoothUpdateField ) { this->m_SmoothUpdateField = SmoothUpdateField; return *this; }
149 
151  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOn() { return this->SetSmoothUpdateField(true); }
152  SITK_RETURN_SELF_TYPE_HEADER SmoothUpdateFieldOff() { return this->SetSmoothUpdateField(false); }
153 
157  bool GetSmoothUpdateField() const { return this->m_SmoothUpdateField; }
158 
162  SITK_RETURN_SELF_TYPE_HEADER SetMaximumKernelWidth ( unsigned int MaximumKernelWidth ) { this->m_MaximumKernelWidth = MaximumKernelWidth; return *this; }
163 
167  unsigned int GetMaximumKernelWidth() const { return this->m_MaximumKernelWidth; }
168 
172  SITK_RETURN_SELF_TYPE_HEADER SetMaximumError ( double MaximumError ) { this->m_MaximumError = MaximumError; return *this; }
173 
177  double GetMaximumError() const { return this->m_MaximumError; }
178 
182  SITK_RETURN_SELF_TYPE_HEADER SetAlpha ( double Alpha ) { this->m_Alpha = Alpha; return *this; }
183 
186  double GetAlpha() const { return this->m_Alpha; }
187 
191  SITK_RETURN_SELF_TYPE_HEADER SetIntensityDifferenceThreshold ( double IntensityDifferenceThreshold ) { this->m_IntensityDifferenceThreshold = IntensityDifferenceThreshold; return *this; }
192 
195  double GetIntensityDifferenceThreshold() const { return this->m_IntensityDifferenceThreshold; }
196 
200  SITK_RETURN_SELF_TYPE_HEADER SetGradientMagnitudeThreshold ( double GradientMagnitudeThreshold ) { this->m_GradientMagnitudeThreshold = GradientMagnitudeThreshold; return *this; }
201 
204  double GetGradientMagnitudeThreshold() const { return this->m_GradientMagnitudeThreshold; }
205 
208  SITK_RETURN_SELF_TYPE_HEADER SetUseImageSpacing ( bool UseImageSpacing ) { this->m_UseImageSpacing = UseImageSpacing; return *this; }
209 
211  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOn() { return this->SetUseImageSpacing(true); }
212  SITK_RETURN_SELF_TYPE_HEADER UseImageSpacingOff() { return this->SetUseImageSpacing(false); }
213 
216  bool GetUseImageSpacing() const { return this->m_UseImageSpacing; }
223  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
224 
231  double GetRMSChange() const { return this->m_RMSChange; };
232 
239  double GetMetric() const { return this->m_Metric; };
240 
242  std::string GetName() const { return std::string ("LevelSetMotionRegistrationFilter"); }
243 
245  std::string ToString() const;
246 
247 
249  Image Execute ( const Image & fixedImage, const Image & movingImage );
250 
251 
253  Image Execute ( const Image & fixedImage, const Image & movingImage, double gradientSmoothingStandardDeviations, uint32_t numberOfIterations, double maximumRMSError, const std::vector<double> & standardDeviations, bool smoothDisplacementField, const std::vector<double> & updateFieldStandardDeviations, bool smoothUpdateField, unsigned int maximumKernelWidth, double maximumError, double alpha, double intensityDifferenceThreshold, double gradientMagnitudeThreshold, bool useImageSpacing );
254 
255 
256  private:
257 
260  typedef Image (Self::*MemberFunctionType)( const Image * fixedImage, const Image * movingImage );
261  template <class TImageType> Image ExecuteInternal ( const Image * fixedImage, const Image * movingImage );
262 
263 
264 
265  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
266 
267  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
268 
269 
271  /* Number of iterations to run */
273  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
275  std::vector<double> m_StandardDeviations;
277  std::vector<double> m_UpdateFieldStandardDeviations;
279  unsigned int m_MaximumKernelWidth;
281  double m_Alpha;
285 
287 
288  double m_RMSChange;
289 
290  double m_Metric;
291 
292  };
293 
294 
295 
296  }
297 }
298 #endif
Deformably register two images using level set motion.
#define SITKBasicFilters_EXPORT
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
uint32_t GetElapsedIterations() const
Number of iterations run.
Self & SetGradientMagnitudeThreshold(double GradientMagnitudeThreshold)
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Self & SetGradientSmoothingStandardDeviations(double GradientSmoothingStandardDeviations)
::uint32_t uint32_t
The main Image class for SimpleITK.
Definition: sitkImage.h:54
Self & SetIntensityDifferenceThreshold(double IntensityDifferenceThreshold)
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Self & SetStandardDeviations(const std::vector< double > &StandardDeviations)
The base interface for SimpleITK filters that take one input image.
Self & SetUpdateFieldStandardDeviations(const std::vector< double > &UpdateFieldStandardDeviations)