SimpleITK  
sitkGeodesicActiveContourLevelSetImageFilter.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 sitkGeodesicActiveContourLevelSetImageFilter_h
19 #define sitkGeodesicActiveContourLevelSetImageFilter_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 
94  public:
96 
99 
103 
106 \
107 
110  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
111 
114  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }\
115 
118  SITK_RETURN_SELF_TYPE_HEADER SetPropagationScaling ( double PropagationScaling ) { this->m_PropagationScaling = PropagationScaling; return *this; }
119 
122  double GetPropagationScaling() const { return this->m_PropagationScaling; }\
123 
126  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureScaling ( double CurvatureScaling ) { this->m_CurvatureScaling = CurvatureScaling; return *this; }
127 
130  double GetCurvatureScaling() const { return this->m_CurvatureScaling; }\
131 
134  SITK_RETURN_SELF_TYPE_HEADER SetAdvectionScaling ( double AdvectionScaling ) { this->m_AdvectionScaling = AdvectionScaling; return *this; }
135 
138  double GetAdvectionScaling() const { return this->m_AdvectionScaling; }\
139 
142  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
143 
146  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
147 
150  SITK_RETURN_SELF_TYPE_HEADER SetReverseExpansionDirection ( bool ReverseExpansionDirection ) { this->m_ReverseExpansionDirection = ReverseExpansionDirection; return *this; }
151 
153  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOn() { return this->SetReverseExpansionDirection(true); }
154  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOff() { return this->SetReverseExpansionDirection(false); }
155 
158  bool GetReverseExpansionDirection() const { return this->m_ReverseExpansionDirection; }
165  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
166 
173  double GetRMSChange() const { return this->m_RMSChange; };
174 
175 
177  std::string GetName() const { return std::string ("GeodesicActiveContourLevelSetImageFilter"); }
178 
180  std::string ToString() const;
181 
182 
184 #ifndef SWIG
185  Image Execute ( Image && initialImage, const Image & featureImage );
186 #endif
187  Image Execute ( const Image & initialImage, const Image & featureImage );
188 
189  private:
190 
193  using MemberFunctionType = Image (Self::*)( const Image * initialImage, const Image * featureImage );
194  template <class TImageType> Image ExecuteInternal ( const Image * initialImage, const Image * featureImage );
195 
196 
198 
199  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
200 
201 
202  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
203  double m_MaximumRMSError{0.01};
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  /* Weight of the advection contribution to the speed term */
212  double m_AdvectionScaling{1.0};
213 
214  /* Number of iterations to run */
215  uint32_t m_NumberOfIterations{1000u};
216 
217  /* 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. */
218  bool m_ReverseExpansionDirection{false};
219 
220  /* Level Set filter that uses propagation, curvature and advection terms. */
221  uint32_t m_ElapsedIterations{0};
222  /* Level Set filter that uses propagation, curvature and advection terms. */
223  double m_RMSChange{0.0};
224 
225 
226  bool m_InPlace{false};
227  };
228 
238 #ifndef SWIG
239  SITKBasicFilters_EXPORT Image GeodesicActiveContourLevelSet ( Image && initialImage, const Image & featureImage, double maximumRMSError = 0.01, double propagationScaling = 1.0, double curvatureScaling = 1.0, double advectionScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false );
240 #endif
241  SITKBasicFilters_EXPORT Image GeodesicActiveContourLevelSet ( const Image & initialImage, const Image & featureImage, double maximumRMSError = 0.01, double propagationScaling = 1.0, double curvatureScaling = 1.0, double advectionScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false );
242 
244 }
245 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
sitkBasicFilters.h
itk::simple::GeodesicActiveContourLevelSetImageFilter::SetCurvatureScaling
Self & SetCurvatureScaling(double CurvatureScaling)
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:126
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetPropagationScaling
double GetPropagationScaling() const
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:122
itk::simple::RealPixelIDTypeList
typelist2::typelist< BasicPixelID< float >, BasicPixelID< double > > RealPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:98
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:29
itk::simple::GeodesicActiveContourLevelSetImageFilter::MemberFunctionType
Image(Self::*)(const Image *initialImage, const Image *featureImage) MemberFunctionType
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:193
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetRMSChange
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:173
sitkImageFilter.h
itk::simple::GeodesicActiveContourLevelSetImageFilter::SetReverseExpansionDirection
Self & SetReverseExpansionDirection(bool ReverseExpansionDirection)
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:150
itk::simple::GeodesicActiveContourLevelSetImageFilter::PixelIDTypeList
RealPixelIDTypeList PixelIDTypeList
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:105
itk::simple::GeodesicActiveContourLevelSetImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:142
itk::simple::GeodesicActiveContourLevelSetImageFilter::SetPropagationScaling
Self & SetPropagationScaling(double PropagationScaling)
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:118
itk::simple::GeodesicActiveContourLevelSetImageFilter
Segments structures in images based on a user supplied edge potential map.
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:93
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetCurvatureScaling
double GetCurvatureScaling() const
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:130
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetName
std::string GetName() const
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:177
itk::simple::GeodesicActiveContourLevelSetImageFilter::ReverseExpansionDirectionOn
Self & ReverseExpansionDirectionOn()
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:153
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:114
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:146
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetReverseExpansionDirection
bool GetReverseExpansionDirection() const
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:158
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:165
itk::simple::GeodesicActiveContourLevelSetImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:199
itk::simple::GeodesicActiveContourLevelSetImageFilter::GetAdvectionScaling
double GetAdvectionScaling() const
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:138
itk::simple::GeodesicActiveContourLevelSet
Image GeodesicActiveContourLevelSet(Image &&initialImage, const Image &featureImage, double maximumRMSError=0.01, double propagationScaling=1.0, double curvatureScaling=1.0, double advectionScaling=1.0, uint32_t numberOfIterations=1000u, bool reverseExpansionDirection=false)
Segments structures in images based on a user supplied edge potential map.
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:35
itk::Image
Definition: sitkPixelIDTypes.h:28
itk::simple::GeodesicActiveContourLevelSetImageFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:110
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::GeodesicActiveContourLevelSetImageFilter::ReverseExpansionDirectionOff
Self & ReverseExpansionDirectionOff()
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:154
itk::simple::GeodesicActiveContourLevelSetImageFilter::SetAdvectionScaling
Self & SetAdvectionScaling(double AdvectionScaling)
Definition: sitkGeodesicActiveContourLevelSetImageFilter.h:134