SimpleITK  
sitkShapeDetectionLevelSetImageFilter.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 sitkShapeDetectionLevelSetImageFilter_h
19 #define sitkShapeDetectionLevelSetImageFilter_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 
96  public:
98 
101 
105 
108 \
109 
112  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
113 
116  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }\
117 
120  SITK_RETURN_SELF_TYPE_HEADER SetPropagationScaling ( double PropagationScaling ) { this->m_PropagationScaling = PropagationScaling; return *this; }
121 
124  double GetPropagationScaling() const { return this->m_PropagationScaling; }\
125 
128  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureScaling ( double CurvatureScaling ) { this->m_CurvatureScaling = CurvatureScaling; return *this; }
129 
132  double GetCurvatureScaling() const { return this->m_CurvatureScaling; }\
133 
136  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
137 
140  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
141 
144  SITK_RETURN_SELF_TYPE_HEADER SetReverseExpansionDirection ( bool ReverseExpansionDirection ) { this->m_ReverseExpansionDirection = ReverseExpansionDirection; return *this; }
145 
147  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOn() { return this->SetReverseExpansionDirection(true); }
148  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOff() { return this->SetReverseExpansionDirection(false); }
149 
152  bool GetReverseExpansionDirection() const { return this->m_ReverseExpansionDirection; }
159  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
160 
167  double GetRMSChange() const { return this->m_RMSChange; };
168 
169 
171  std::string GetName() const { return std::string ("ShapeDetectionLevelSetImageFilter"); }
172 
174  std::string ToString() const;
175 
176 
178 #ifndef SWIG
179  Image Execute ( Image && initialImage, const Image & featureImage );
180 #endif
181  Image Execute ( const Image & initialImage, const Image & featureImage );
182 
183  private:
184 
187  using MemberFunctionType = Image (Self::*)( const Image * initialImage, const Image * featureImage );
188  template <class TImageType> Image ExecuteInternal ( const Image * initialImage, const Image * featureImage );
189 
190 
192 
193  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
194 
195 
196  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
197  double m_MaximumRMSError{0.02};
198 
199  /* Weight of direct propagation contribution to the speed term */
200  double m_PropagationScaling{1.0};
201 
202  /* Weight of the curvature contribution to the speed term */
203  double m_CurvatureScaling{1.0};
204 
205  /* Number of iterations to run */
206  uint32_t m_NumberOfIterations{1000u};
207 
208  /* 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. */
209  bool m_ReverseExpansionDirection{false};
210 
211  /* Level Set filter that uses propagation and curvature terms. */
212  uint32_t m_ElapsedIterations{0};
213  /* Level Set filter that uses propagation and curvature terms. */
214  double m_RMSChange{0.0};
215 
216 
217  bool m_InPlace{false};
218  };
219 
229 #ifndef SWIG
230  SITKBasicFilters_EXPORT Image ShapeDetectionLevelSet ( Image && initialImage, const Image & featureImage, double maximumRMSError = 0.02, double propagationScaling = 1.0, double curvatureScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false );
231 #endif
232  SITKBasicFilters_EXPORT Image ShapeDetectionLevelSet ( 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 );
233 
235 }
236 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:76
sitkBasicFilters.h
itk::simple::ShapeDetectionLevelSetImageFilter::GetRMSChange
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Definition: sitkShapeDetectionLevelSetImageFilter.h:167
itk::simple::RealPixelIDTypeList
typelist2::typelist< BasicPixelID< float >, BasicPixelID< double > > RealPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:98
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:28
itk::simple::ShapeDetectionLevelSetImageFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkShapeDetectionLevelSetImageFilter.h:159
itk::simple::ShapeDetectionLevelSetImageFilter
Segments structures in images based on a user supplied edge potential map.
Definition: sitkShapeDetectionLevelSetImageFilter.h:95
itk::simple::ShapeDetectionLevelSetImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkShapeDetectionLevelSetImageFilter.h:136
itk::simple::ShapeDetectionLevelSetImageFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkShapeDetectionLevelSetImageFilter.h:116
sitkImageFilter.h
itk::simple::ShapeDetectionLevelSetImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkShapeDetectionLevelSetImageFilter.h:193
itk::simple::ShapeDetectionLevelSetImageFilter::ReverseExpansionDirectionOn
Self & ReverseExpansionDirectionOn()
Definition: sitkShapeDetectionLevelSetImageFilter.h:147
itk::simple::ShapeDetectionLevelSetImageFilter::MemberFunctionType
Image(Self::*)(const Image *initialImage, const Image *featureImage) MemberFunctionType
Definition: sitkShapeDetectionLevelSetImageFilter.h:187
itk::simple::ShapeDetectionLevelSetImageFilter::ReverseExpansionDirectionOff
Self & ReverseExpansionDirectionOff()
Definition: sitkShapeDetectionLevelSetImageFilter.h:148
itk::simple::ShapeDetectionLevelSetImageFilter::GetReverseExpansionDirection
bool GetReverseExpansionDirection() const
Definition: sitkShapeDetectionLevelSetImageFilter.h:152
itk::simple::ShapeDetectionLevelSetImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkShapeDetectionLevelSetImageFilter.h:140
itk::simple::ShapeDetectionLevelSetImageFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkShapeDetectionLevelSetImageFilter.h:112
itk::simple::ShapeDetectionLevelSetImageFilter::GetPropagationScaling
double GetPropagationScaling() const
Definition: sitkShapeDetectionLevelSetImageFilter.h:124
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::ShapeDetectionLevelSet
Image ShapeDetectionLevelSet(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 user supplied edge potential map.
itk::simple::ShapeDetectionLevelSetImageFilter::PixelIDTypeList
RealPixelIDTypeList PixelIDTypeList
Definition: sitkShapeDetectionLevelSetImageFilter.h:107
itk::simple::ShapeDetectionLevelSetImageFilter::GetCurvatureScaling
double GetCurvatureScaling() const
Definition: sitkShapeDetectionLevelSetImageFilter.h:132
itk::simple::ShapeDetectionLevelSetImageFilter::GetName
std::string GetName() const
Definition: sitkShapeDetectionLevelSetImageFilter.h:171
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:34
itk::simple::ShapeDetectionLevelSetImageFilter::SetPropagationScaling
Self & SetPropagationScaling(double PropagationScaling)
Definition: sitkShapeDetectionLevelSetImageFilter.h:120
itk::Image
Definition: sitkPixelIDTypes.h:26
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::ShapeDetectionLevelSetImageFilter::SetReverseExpansionDirection
Self & SetReverseExpansionDirection(bool ReverseExpansionDirection)
Definition: sitkShapeDetectionLevelSetImageFilter.h:144
itk::simple::ShapeDetectionLevelSetImageFilter::SetCurvatureScaling
Self & SetCurvatureScaling(double CurvatureScaling)
Definition: sitkShapeDetectionLevelSetImageFilter.h:128