SimpleITK  1.3.0.dev466
sitkCannySegmentationLevelSetImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
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 
98  public:
100 
103 
107 
110 
111 
112 
116  SITK_RETURN_SELF_TYPE_HEADER SetThreshold ( double Threshold ) { this->m_Threshold = Threshold; return *this; }
117 
121  double GetThreshold() const { return this->m_Threshold; }
122 
126  SITK_RETURN_SELF_TYPE_HEADER SetVariance ( double Variance ) { this->m_Variance = Variance; return *this; }
127 
131  double GetVariance() const { return this->m_Variance; }
132 
135  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
136 
139  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }
140 
143  SITK_RETURN_SELF_TYPE_HEADER SetPropagationScaling ( double PropagationScaling ) { this->m_PropagationScaling = PropagationScaling; return *this; }
144 
147  double GetPropagationScaling() const { return this->m_PropagationScaling; }
148 
151  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureScaling ( double CurvatureScaling ) { this->m_CurvatureScaling = CurvatureScaling; return *this; }
152 
155  double GetCurvatureScaling() const { return this->m_CurvatureScaling; }
156 
159  SITK_RETURN_SELF_TYPE_HEADER SetAdvectionScaling ( double AdvectionScaling ) { this->m_AdvectionScaling = AdvectionScaling; return *this; }
160 
163  double GetAdvectionScaling() const { return this->m_AdvectionScaling; }
164 
167  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
168 
171  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }
172 
175  SITK_RETURN_SELF_TYPE_HEADER SetReverseExpansionDirection ( bool ReverseExpansionDirection ) { this->m_ReverseExpansionDirection = ReverseExpansionDirection; return *this; }
176 
178  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOn() { return this->SetReverseExpansionDirection(true); }
179  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOff() { return this->SetReverseExpansionDirection(false); }
180 
183  bool GetReverseExpansionDirection() const { return this->m_ReverseExpansionDirection; }
184 
187  SITK_RETURN_SELF_TYPE_HEADER SetIsoSurfaceValue ( double IsoSurfaceValue ) { this->m_IsoSurfaceValue = IsoSurfaceValue; return *this; }
188 
191  double GetIsoSurfaceValue() const { return this->m_IsoSurfaceValue; }
198  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
199 
206  double GetRMSChange() const { return this->m_RMSChange; };
207 
214  Image GetCannyImage() const { return this->m_CannyImage; };
215 
217  std::string GetName() const { return std::string ("CannySegmentationLevelSetImageFilter"); }
218 
220  std::string ToString() const;
221 
222 
224  Image Execute ( const Image & initialImage, const Image & featureImage );
225 
226 
228  Image Execute ( const Image & initialImage, const Image & featureImage, double threshold, double variance, double maximumRMSError, double propagationScaling, double curvatureScaling, double advectionScaling, uint32_t numberOfIterations, bool reverseExpansionDirection, double isoSurfaceValue );
229 
230  private:
231 
234  typedef Image (Self::*MemberFunctionType)( const Image * initialImage, const Image * featureImage );
235  template <class TImageType> Image ExecuteInternal ( const Image * initialImage, const Image * featureImage );
236 
237 
238  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
239 
240  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
241 
242 
243  double m_Threshold;
244  double m_Variance;
245  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
247  /* Weight of direct propagation contribution to the speed term */
249  /* Weight of the curvature contribution to the speed term */
251  /* Weight of the advection contribution to the speed term */
253  /* Number of iterations to run */
255  /* 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. */
257  /* */
259 
261 
262  double m_RMSChange;
263 
265 
266  };
267 
268 
277  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 );
278 
279  }
280 }
281 #endif
#define SITKBasicFilters_EXPORT
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
Image Threshold(const 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...
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
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)
Segments structures in images based on image features derived from pseudo-canny-edges.
::uint32_t uint32_t
The Image class for SimpleITK.
Definition: sitkImage.h:78
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Segments structures in images based on image features derived from pseudo-canny-edges.
The base interface for SimpleITK filters that take one input image.