SimpleITK  1.2.4
sitkThresholdSegmentationLevelSetImageFilter.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 sitkThresholdSegmentationLevelSetImageFilter_h
19 #define sitkThresholdSegmentationLevelSetImageFilter_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 
71  public:
73 
76 
80 
83 
84 
85 
88  SITK_RETURN_SELF_TYPE_HEADER SetLowerThreshold ( double LowerThreshold ) { this->m_LowerThreshold = LowerThreshold; return *this; }
89 
92  double GetLowerThreshold() const { return this->m_LowerThreshold; }
93 
97  SITK_RETURN_SELF_TYPE_HEADER SetUpperThreshold ( double UpperThreshold ) { this->m_UpperThreshold = UpperThreshold; return *this; }
98 
101  double GetUpperThreshold() const { return this->m_UpperThreshold; }
102 
105  SITK_RETURN_SELF_TYPE_HEADER SetMaximumRMSError ( double MaximumRMSError ) { this->m_MaximumRMSError = MaximumRMSError; return *this; }
106 
109  double GetMaximumRMSError() const { return this->m_MaximumRMSError; }
110 
113  SITK_RETURN_SELF_TYPE_HEADER SetPropagationScaling ( double PropagationScaling ) { this->m_PropagationScaling = PropagationScaling; return *this; }
114 
117  double GetPropagationScaling() const { return this->m_PropagationScaling; }
118 
121  SITK_RETURN_SELF_TYPE_HEADER SetCurvatureScaling ( double CurvatureScaling ) { this->m_CurvatureScaling = CurvatureScaling; return *this; }
122 
125  double GetCurvatureScaling() const { return this->m_CurvatureScaling; }
126 
129  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfIterations ( uint32_t NumberOfIterations ) { this->m_NumberOfIterations = NumberOfIterations; return *this; }
130 
133  uint32_t GetNumberOfIterations() const { return this->m_NumberOfIterations; }
134 
137  SITK_RETURN_SELF_TYPE_HEADER SetReverseExpansionDirection ( bool ReverseExpansionDirection ) { this->m_ReverseExpansionDirection = ReverseExpansionDirection; return *this; }
138 
140  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOn() { return this->SetReverseExpansionDirection(true); }
141  SITK_RETURN_SELF_TYPE_HEADER ReverseExpansionDirectionOff() { return this->SetReverseExpansionDirection(false); }
142 
145  bool GetReverseExpansionDirection() const { return this->m_ReverseExpansionDirection; }
152  uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; };
153 
160  double GetRMSChange() const { return this->m_RMSChange; };
161 
163  std::string GetName() const { return std::string ("ThresholdSegmentationLevelSetImageFilter"); }
164 
166  std::string ToString() const;
167 
168 
170  Image Execute ( const Image& image1, const Image& image2 );
171 
172 
174  Image Execute ( const Image& image1, const Image& image2, double lowerThreshold, double upperThreshold, double maximumRMSError, double propagationScaling, double curvatureScaling, uint32_t numberOfIterations, bool reverseExpansionDirection );
175 
176  private:
177 
180  typedef Image (Self::*MemberFunctionType)( const Image& image1, const Image& image2 );
181  template <class TImageType> Image ExecuteInternal ( const Image& image1, const Image& image2 );
182 
183 
184  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
185 
186  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
187 
188 
191  /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
193  /* Weight of direct propagation contribution to the speed term */
195  /* Weight of the curvature contribution to the speed term */
197  /* Number of iterations to run */
199  /* 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. */
201 
203 
204  double m_RMSChange;
205 
206  };
207 
208 
217  SITKBasicFilters_EXPORT Image ThresholdSegmentationLevelSet ( const Image& image1, const Image& image2, double lowerThreshold = 0.0, double upperThreshold = 255.0, double maximumRMSError = 0.02, double propagationScaling = 1.0, double curvatureScaling = 1.0, uint32_t numberOfIterations = 1000u, bool reverseExpansionDirection = false );
218 
219  }
220 }
221 #endif
#define SITKBasicFilters_EXPORT
Image ThresholdSegmentationLevelSet(const Image &image1, const Image &image2, double lowerThreshold=0.0, double upperThreshold=255.0, 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 intensity values.
Segments structures in images based on intensity values.
typelist::MakeTypeList< BasicPixelID< float >, BasicPixelID< double > >::Type RealPixelIDTypeList
::uint32_t uint32_t
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
The Image class for SimpleITK.
Definition: sitkImage.h:78
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
The base interface for SimpleITK filters that take one input image.