SimpleITK  2.0.0rc2.post21
sitkThresholdSegmentationLevelSetImageFilter.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 sitkThresholdSegmentationLevelSetImageFilter_h
19 #define sitkThresholdSegmentationLevelSetImageFilter_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 
81  public:
83 
86 
90 
93 \
94 
97  SITK_RETURN_SELF_TYPE_HEADER SetLowerThreshold ( double LowerThreshold ) { this->m_LowerThreshold = LowerThreshold; return *this; }
98 
101  double GetLowerThreshold() const { return this->m_LowerThreshold; }\
102 
106  SITK_RETURN_SELF_TYPE_HEADER SetUpperThreshold ( double UpperThreshold ) { this->m_UpperThreshold = UpperThreshold; return *this; }
107 
110  double GetUpperThreshold() const { return this->m_UpperThreshold; }\
111 
114  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
115 
118  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }\
119 
122  SITK_RETURN_SELF_TYPE_HEADER SetPropagationScaling ( double PropagationScaling ) { this->m_PropagationScaling = PropagationScaling; return *this; }
123 
126  double GetPropagationScaling() const { return this->m_PropagationScaling; }\
127 
130  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureScaling ( double CurvatureScaling ) { this->m_CurvatureScaling = CurvatureScaling; return *this; }
131 
134  double GetCurvatureScaling() const { return this->m_CurvatureScaling; }\
135 
138  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
139 
142  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
143 
146  SITK_RETURN_SELF_TYPE_HEADER SetReverseExpansionDirection ( bool ReverseExpansionDirection ) { this->m_ReverseExpansionDirection = ReverseExpansionDirection; return *this; }
147 
149  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOn() { return this->SetReverseExpansionDirection(true); }
150  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOff() { return this->SetReverseExpansionDirection(false); }
151 
154  bool GetReverseExpansionDirection() const { return this->m_ReverseExpansionDirection; }
161  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
162 
169  double GetRMSChange() const { return this->m_RMSChange; };
170 
171 
173  std::string GetName() const { return std::string ("ThresholdSegmentationLevelSetImageFilter"); }
174 
176  std::string ToString() const;
177 
178 
180 #ifndef SWIG
181  Image Execute ( Image && initialImage, const Image & featureImage );
182 #endif
183  Image Execute ( const Image & initialImage, const Image & featureImage );
184 
185  private:
186 
189  using MemberFunctionType = Image (Self::*)( const Image * initialImage, const Image * featureImage );
190  template <class TImageType> Image ExecuteInternal ( const Image * initialImage, const Image * featureImage );
191 
192 
194 
195  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
196 
197 
198  double m_LowerThreshold{0.0};
199 
200  double m_UpperThreshold{255.0};
201 
202  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
203  double m_MaximumRMSError{0.02};
204 
205  /* Weight of direct propagation contribution to the speed term */
206  double m_PropagationScaling{1.0};
207 
208  /* Weight of the curvature contribution to the speed term */
209  double m_CurvatureScaling{1.0};
210 
211  /* Number of iterations to run */
212  uint32_t m_NumberOfIterations{1000u};
213 
214  /* Turn On/Off the flag which determines whether Positive or Negative speed terms will cause surface expansion. If set to TRUE then negative speed terms will cause the surface to expand and positive speed terms will cause the surface to contract. If set to FALSE (default) then positive speed terms will cause the surface to expand and negative speed terms will cause the surface to contract. This method can be safely used to reverse the expansion/contraction as appropriate to a particular application or data set. */
215  bool m_ReverseExpansionDirection{false};
216 
217 
218  uint32_t m_ElapsedIterations{0};
219 
220  double m_RMSChange{0.0};
221 
222 
223  bool m_InPlace{false};
224  };
225 
235 #ifndef SWIG
236  SITKBasicFilters_EXPORT Image ThresholdSegmentationLevelSet ( Image && initialImage, const Image & featureImage, double lowerThreshold = 0.0, double upperThreshold = 255.0, double maximumRMSError = 0.02, double propagationScaling = 1.0, double curvatureScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false );
237 #endif
238  SITKBasicFilters_EXPORT Image ThresholdSegmentationLevelSet ( const Image & initialImage, const Image & featureImage, double lowerThreshold = 0.0, double upperThreshold = 255.0, double maximumRMSError = 0.02, double propagationScaling = 1.0, double curvatureScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false );
239 
241  }
242 }
243 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
sitkBasicFilters.h
itk::simple::ThresholdSegmentationLevelSetImageFilter::SetReverseExpansionDirection
Self & SetReverseExpansionDirection(bool ReverseExpansionDirection)
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:146
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetLowerThreshold
double GetLowerThreshold() const
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:101
itk::simple::RealPixelIDTypeList
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:96
itk::simple::ThresholdSegmentationLevelSetImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:138
itk::simple::ThresholdSegmentationLevelSetImageFilter::ReverseExpansionDirectionOff
Self & ReverseExpansionDirectionOff()
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:150
sitkImageFilter.h
itk::simple::ThresholdSegmentationLevelSetImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:195
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetName
std::string GetName() const
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:173
itk::simple::ThresholdSegmentationLevelSetImageFilter::SetCurvatureScaling
Self & SetCurvatureScaling(double CurvatureScaling)
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:130
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetCurvatureScaling
double GetCurvatureScaling() const
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:134
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:118
itk::simple::ThresholdSegmentationLevelSetImageFilter::ReverseExpansionDirectionOn
Self & ReverseExpansionDirectionOn()
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:149
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::ThresholdSegmentationLevelSetImageFilter::SetUpperThreshold
Self & SetUpperThreshold(double UpperThreshold)
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:106
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetReverseExpansionDirection
bool GetReverseExpansionDirection() const
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:154
itk::simple::ThresholdSegmentationLevelSet
Image ThresholdSegmentationLevelSet(Image &&initialImage, const Image &featureImage, double lowerThreshold=0.0, double upperThreshold=255.0, double maximumRMSError=0.02, double propagationScaling=1.0, double curvatureScaling=1.0, uint32_t numberOfIterations=1000u, bool reverseExpansionDirection=false)
Segments structures in images based on intensity values.
itk::simple::ThresholdSegmentationLevelSetImageFilter
Segments structures in images based on intensity values.
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:80
itk
itk::simple::ThresholdSegmentationLevelSetImageFilter::SetPropagationScaling
Self & SetPropagationScaling(double PropagationScaling)
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:122
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetRMSChange
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:169
itk::simple::ThresholdSegmentationLevelSetImageFilter::SetLowerThreshold
Self & SetLowerThreshold(double LowerThreshold)
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:97
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetPropagationScaling
double GetPropagationScaling() const
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:126
itk::Image
Definition: sitkPixelIDTypes.h:26
itk::simple::ThresholdSegmentationLevelSetImageFilter::MemberFunctionType
Image(Self::*)(const Image *initialImage, const Image *featureImage) MemberFunctionType
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:189
itk::uint32_t
::uint32_t uint32_t
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:142
itk::simple::ThresholdSegmentationLevelSetImageFilter::PixelIDTypeList
RealPixelIDTypeList PixelIDTypeList
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:92
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetUpperThreshold
double GetUpperThreshold() const
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:110
itk::simple::ThresholdSegmentationLevelSetImageFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:114
itk::simple::ThresholdSegmentationLevelSetImageFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkThresholdSegmentationLevelSetImageFilter.h:161