SimpleITK  2.0.0
sitkCannySegmentationLevelSetImageFilter.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 sitkCannySegmentationLevelSetImageFilter_h
19 #define sitkCannySegmentationLevelSetImageFilter_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 
117  public:
119 
122 
126 
129 \
130 
134  SITK_RETURN_SELF_TYPE_HEADER SetThreshold ( double Threshold ) { this->m_Threshold = Threshold; return *this; }
135 
139  double GetThreshold() const { return this->m_Threshold; }\
140 
144  SITK_RETURN_SELF_TYPE_HEADER SetVariance ( double Variance ) { this->m_Variance = Variance; return *this; }
145 
149  double GetVariance() const { return this->m_Variance; }\
150 
153  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
154 
157  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }\
158 
161  SITK_RETURN_SELF_TYPE_HEADER SetPropagationScaling ( double PropagationScaling ) { this->m_PropagationScaling = PropagationScaling; return *this; }
162 
165  double GetPropagationScaling() const { return this->m_PropagationScaling; }\
166 
169  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureScaling ( double CurvatureScaling ) { this->m_CurvatureScaling = CurvatureScaling; return *this; }
170 
173  double GetCurvatureScaling() const { return this->m_CurvatureScaling; }\
174 
177  SITK_RETURN_SELF_TYPE_HEADER SetAdvectionScaling ( double AdvectionScaling ) { this->m_AdvectionScaling = AdvectionScaling; return *this; }
178 
181  double GetAdvectionScaling() const { return this->m_AdvectionScaling; }\
182 
185  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
186 
189  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }\
190 
193  SITK_RETURN_SELF_TYPE_HEADER SetReverseExpansionDirection ( bool ReverseExpansionDirection ) { this->m_ReverseExpansionDirection = ReverseExpansionDirection; return *this; }
194 
196  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOn() { return this->SetReverseExpansionDirection(true); }
197  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOff() { return this->SetReverseExpansionDirection(false); }
198 
201  bool GetReverseExpansionDirection() const { return this->m_ReverseExpansionDirection; }\
202 
205  SITK_RETURN_SELF_TYPE_HEADER SetIsoSurfaceValue ( double IsoSurfaceValue ) { this->m_IsoSurfaceValue = IsoSurfaceValue; return *this; }
206 
209  double GetIsoSurfaceValue() const { return this->m_IsoSurfaceValue; }
216  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
217 
224  double GetRMSChange() const { return this->m_RMSChange; };
225 
232  Image GetCannyImage() const { return this->m_CannyImage; };
233 
234 
236  std::string GetName() const { return std::string ("CannySegmentationLevelSetImageFilter"); }
237 
239  std::string ToString() const;
240 
241 
243 #ifndef SWIG
244  Image Execute ( Image && initialImage, const Image & featureImage );
245 #endif
246  Image Execute ( const Image & initialImage, const Image & featureImage );
247 
248  private:
249 
252  using MemberFunctionType = Image (Self::*)( const Image * initialImage, const Image * featureImage );
253  template <class TImageType> Image ExecuteInternal ( const Image * initialImage, const Image * featureImage );
254 
255 
257 
258  std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
259 
260 
261  double m_Threshold{0.0};
262 
263  double m_Variance{0.0};
264 
265  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
266  double m_MaximumRMSError{0.02};
267 
268  /* Weight of direct propagation contribution to the speed term */
269  double m_PropagationScaling{1.0};
270 
271  /* Weight of the curvature contribution to the speed term */
272  double m_CurvatureScaling{1.0};
273 
274  /* Weight of the advection contribution to the speed term */
275  double m_AdvectionScaling{1.0};
276 
277  /* Number of iterations to run */
278  uint32_t m_NumberOfIterations{1000u};
279 
280  /* 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. */
281  bool m_ReverseExpansionDirection{false};
282 
283  /* */
284  double m_IsoSurfaceValue{0.0};
285 
286 
287  uint32_t m_ElapsedIterations{0};
288 
289  double m_RMSChange{0.0};
290 
291  Image m_CannyImage{Image()};
292 
293 
294  bool m_InPlace{false};
295  };
296 
306 #ifndef SWIG
307  SITKBasicFilters_EXPORT Image CannySegmentationLevelSet ( Image && initialImage, const Image & featureImage, double threshold = 0.0, double variance = 0.0, double maximumRMSError = 0.02, double propagationScaling = 1.0, double curvatureScaling = 1.0, double advectionScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false, double isoSurfaceValue = 0.0 );
308 #endif
309  SITKBasicFilters_EXPORT Image CannySegmentationLevelSet ( const Image & initialImage, const Image & featureImage, double threshold = 0.0, double variance = 0.0, double maximumRMSError = 0.02, double propagationScaling = 1.0, double curvatureScaling = 1.0, double advectionScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false, double isoSurfaceValue = 0.0 );
310 
312  }
313 }
314 #endif
itk::simple::Image
The Image class for SimpleITK.
Definition: sitkImage.h:75
sitkBasicFilters.h
itk::simple::CannySegmentationLevelSetImageFilter::GetRMSChange
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Definition: sitkCannySegmentationLevelSetImageFilter.h:224
itk::simple::CannySegmentationLevelSetImageFilter::GetThreshold
double GetThreshold() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:139
itk::simple::CannySegmentationLevelSetImageFilter::GetNumberOfIterations
uint32_t GetNumberOfIterations() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:189
itk::simple::CannySegmentationLevelSetImageFilter::SetIsoSurfaceValue
Self & SetIsoSurfaceValue(double IsoSurfaceValue)
Definition: sitkCannySegmentationLevelSetImageFilter.h:205
itk::simple::CannySegmentationLevelSetImageFilter
Segments structures in images based on image features derived from pseudo-canny-edges.
Definition: sitkCannySegmentationLevelSetImageFilter.h:116
itk::simple::CannySegmentationLevelSetImageFilter::m_MemberFactory
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Definition: sitkCannySegmentationLevelSetImageFilter.h:258
itk::simple::CannySegmentationLevelSetImageFilter::GetName
std::string GetName() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:236
itk::simple::detail::MemberFunctionAddressor
Definition: sitkDetail.h:32
itk::simple::RealPixelIDTypeList
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:96
itk::simple::CannySegmentationLevelSetImageFilter::GetCurvatureScaling
double GetCurvatureScaling() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:173
itk::simple::CannySegmentationLevelSetImageFilter::SetVariance
Self & SetVariance(double Variance)
Definition: sitkCannySegmentationLevelSetImageFilter.h:144
itk::simple::CannySegmentationLevelSetImageFilter::GetReverseExpansionDirection
bool GetReverseExpansionDirection() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:201
itk::simple::CannySegmentationLevelSetImageFilter::GetMaximumRMSError
double GetMaximumRMSError() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:157
itk::simple::CannySegmentationLevelSetImageFilter::GetVariance
double GetVariance() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:149
itk::simple::CannySegmentationLevelSetImageFilter::ReverseExpansionDirectionOff
Self & ReverseExpansionDirectionOff()
Definition: sitkCannySegmentationLevelSetImageFilter.h:197
itk::simple::CannySegmentationLevelSetImageFilter::SetNumberOfIterations
Self & SetNumberOfIterations(uint32_t NumberOfIterations)
Definition: sitkCannySegmentationLevelSetImageFilter.h:185
sitkImageFilter.h
itk::simple::CannySegmentationLevelSetImageFilter::GetCannyImage
Image GetCannyImage() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:232
itk::simple::CannySegmentationLevelSetImageFilter::GetAdvectionScaling
double GetAdvectionScaling() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:181
itk::simple::CannySegmentationLevelSetImageFilter::SetReverseExpansionDirection
Self & SetReverseExpansionDirection(bool ReverseExpansionDirection)
Definition: sitkCannySegmentationLevelSetImageFilter.h:193
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:52
itk::simple::CannySegmentationLevelSetImageFilter::ReverseExpansionDirectionOn
Self & ReverseExpansionDirectionOn()
Definition: sitkCannySegmentationLevelSetImageFilter.h:196
itk::simple::Threshold
Image Threshold(Image &&image1, double lower=0.0, double upper=1.0, double outsideValue=0.0)
Set image values to a user-specified value if they are below, above, or between simple threshold valu...
itk
itk::simple::CannySegmentationLevelSetImageFilter::MemberFunctionType
Image(Self::*)(const Image *initialImage, const Image *featureImage) MemberFunctionType
Definition: sitkCannySegmentationLevelSetImageFilter.h:252
itk::simple::CannySegmentationLevelSetImageFilter::GetPropagationScaling
double GetPropagationScaling() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:165
itk::simple::CannySegmentationLevelSetImageFilter::GetElapsedIterations
uint32_t GetElapsedIterations() const
Number of iterations run.
Definition: sitkCannySegmentationLevelSetImageFilter.h:216
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:36
itk::simple::CannySegmentationLevelSet
Image CannySegmentationLevelSet(Image &&initialImage, const Image &featureImage, double threshold=0.0, double variance=0.0, double maximumRMSError=0.02, double propagationScaling=1.0, double curvatureScaling=1.0, double advectionScaling=1.0, uint32_t numberOfIterations=1000u, bool reverseExpansionDirection=false, double isoSurfaceValue=0.0)
Segments structures in images based on image features derived from pseudo-canny-edges.
itk::simple::CannySegmentationLevelSetImageFilter::SetAdvectionScaling
Self & SetAdvectionScaling(double AdvectionScaling)
Definition: sitkCannySegmentationLevelSetImageFilter.h:177
itk::Image
Definition: sitkPixelIDTypes.h:26
itk::simple::CannySegmentationLevelSetImageFilter::SetMaximumRMSError
Self & SetMaximumRMSError(double MaximumRMSError)
Definition: sitkCannySegmentationLevelSetImageFilter.h:153
itk::uint32_t
::uint32_t uint32_t
itk::simple::CannySegmentationLevelSetImageFilter::SetCurvatureScaling
Self & SetCurvatureScaling(double CurvatureScaling)
Definition: sitkCannySegmentationLevelSetImageFilter.h:169
itk::simple::CannySegmentationLevelSetImageFilter::PixelIDTypeList
RealPixelIDTypeList PixelIDTypeList
Definition: sitkCannySegmentationLevelSetImageFilter.h:128
itk::simple::CannySegmentationLevelSetImageFilter::SetPropagationScaling
Self & SetPropagationScaling(double PropagationScaling)
Definition: sitkCannySegmentationLevelSetImageFilter.h:161
itk::simple::CannySegmentationLevelSetImageFilter::GetIsoSurfaceValue
double GetIsoSurfaceValue() const
Definition: sitkCannySegmentationLevelSetImageFilter.h:209
itk::simple::CannySegmentationLevelSetImageFilter::SetThreshold
Self & SetThreshold(double Threshold)
Definition: sitkCannySegmentationLevelSetImageFilter.h:134