SimpleITK  
sitkLaplacianSegmentationLevelSetImageFilter.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 sitkLaplacianSegmentationLevelSetImageFilter_h
19 #define sitkLaplacianSegmentationLevelSetImageFilter_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 
90  public:
92 
95 
99 
102 \
103 
106  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
107 
110  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }\
111 
114  SITK_RETURN_SELF_TYPE_HEADER SetPropagationScaling ( double PropagationScaling ) { this->m_PropagationScaling = PropagationScaling; return *this; }
115 
118  double GetPropagationScaling() const { return this->m_PropagationScaling; }\
119 
122  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureScaling ( double CurvatureScaling ) { this->m_CurvatureScaling = CurvatureScaling; return *this; }
123 
126  double GetCurvatureScaling() const { return this->m_CurvatureScaling; }\
127 
130  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
131 
134  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
135 
138  SITK_RETURN_SELF_TYPE_HEADER SetReverseExpansionDirection ( bool ReverseExpansionDirection ) { this->m_ReverseExpansionDirection = ReverseExpansionDirection; return *this; }
139 
141  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOn() { return this->SetReverseExpansionDirection(true); }
142  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOff() { return this->SetReverseExpansionDirection(false); }
143 
146  bool GetReverseExpansionDirection() const { return this->m_ReverseExpansionDirection; }
153  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
154 
161  double GetRMSChange() const { return this->m_RMSChange; };
162 
163 
165  std::string GetName() const { return std::string ("LaplacianSegmentationLevelSetImageFilter"); }
166 
168  std::string ToString() const;
169 
170 
172 #ifndef SWIG
173  Image Execute ( Image && initialImage, const Image & featureImage );
174 #endif
175  Image Execute ( const Image & initialImage, const Image & featureImage );
176 
177  private:
178 
181  using MemberFunctionType = Image (Self::*)( const Image * initialImage, const Image * featureImage );
182  template <class TImageType> Image ExecuteInternal ( const Image * initialImage, const Image * featureImage );
183 
184 
186 
187  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
188 
189 
190  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
191  double m_MaximumRMSError{0.02};
192 
193  /* Weight of direct propagation contribution to the speed term */
194  double m_PropagationScaling{1.0};
195 
196  /* Weight of the curvature contribution to the speed term */
197  double m_CurvatureScaling{1.0};
198 
199  /* Number of iterations to run */
200  uint32_t m_NumberOfIterations{1000u};
201 
202  /* 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. */
203  bool m_ReverseExpansionDirection{false};
204 
205 
206  uint32_t m_ElapsedIterations{0};
207 
208  double m_RMSChange{0.0};
209 
210 
211  bool m_InPlace{false};
212  };
213 
223 #ifndef SWIG
224  SITKBasicFilters_EXPORT Image LaplacianSegmentationLevelSet ( Image && initialImage, const Image & featureImage, double maximumRMSError = 0.02, double propagationScaling = 1.0, double curvatureScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false );
225 #endif
226  SITKBasicFilters_EXPORT Image LaplacianSegmentationLevelSet ( const Image & initialImage, const Image & featureImage, double maximumRMSError = 0.02, double propagationScaling = 1.0, double curvatureScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false );
227 
229 }
230 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
sitkBasicFilters.h
itk::simple::LaplacianSegmentationLevelSetImageFilter
Segments structures in images based on a second derivative image features.
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:89
itk::simple::RealPixelIDTypeList
typelist2::typelist< BasicPixelID< float >, BasicPixelID< double > > RealPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:98
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:28
itk::simple::LaplacianSegmentationLevelSetImageFilter::ReverseExpansionDirectionOff
Self & ReverseExpansionDirectionOff()
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:142
itk::simple::LaplacianSegmentationLevelSetImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:130
itk::simple::LaplacianSegmentationLevelSetImageFilter::GetRMSChange
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:161
itk::simple::LaplacianSegmentationLevelSetImageFilter::SetReverseExpansionDirection
Self & SetReverseExpansionDirection(bool ReverseExpansionDirection)
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:138
itk::simple::LaplacianSegmentationLevelSetImageFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:153
itk::simple::LaplacianSegmentationLevelSetImageFilter::SetCurvatureScaling
Self & SetCurvatureScaling(double CurvatureScaling)
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:122
itk::simple::LaplacianSegmentationLevelSetImageFilter::ReverseExpansionDirectionOn
Self & ReverseExpansionDirectionOn()
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:141
sitkImageFilter.h
itk::simple::LaplacianSegmentationLevelSetImageFilter::GetPropagationScaling
double GetPropagationScaling() const
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:118
itk::simple::LaplacianSegmentationLevelSetImageFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:110
itk::simple::LaplacianSegmentationLevelSetImageFilter::MemberFunctionType
Image(Self::*)(const Image *initialImage, const Image *featureImage) MemberFunctionType
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:181
itk::simple::LaplacianSegmentationLevelSetImageFilter::GetReverseExpansionDirection
bool GetReverseExpansionDirection() const
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:146
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::LaplacianSegmentationLevelSetImageFilter::PixelIDTypeList
RealPixelIDTypeList PixelIDTypeList
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:101
itk::simple::LaplacianSegmentationLevelSet
Image LaplacianSegmentationLevelSet(Image &&initialImage, const Image &featureImage, 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 a second derivative image features.
itk::simple::LaplacianSegmentationLevelSetImageFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:106
itk::simple::LaplacianSegmentationLevelSetImageFilter::SetPropagationScaling
Self & SetPropagationScaling(double PropagationScaling)
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:114
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:34
itk::Image
Definition: sitkPixelIDTypes.h:26
itk::simple::LaplacianSegmentationLevelSetImageFilter::GetName
std::string GetName() const
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:165
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::LaplacianSegmentationLevelSetImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:134
itk::simple::LaplacianSegmentationLevelSetImageFilter::GetCurvatureScaling
double GetCurvatureScaling() const
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:126
itk::simple::LaplacianSegmentationLevelSetImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkLaplacianSegmentationLevelSetImageFilter.h:187