SimpleITK  
sitkThresholdSegmentationLevelSetImageFilter.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 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.jinja to make changes.
25 */
26
27#include <memory>
28
29#include "sitkBasicFilters.h"
30#include "sitkImageFilter.h"
32
33namespace itk::simple {
34
96public:
98
101
105
108
109
110
111
114 void
115 SetLowerThreshold(double LowerThreshold )
116 { this->m_LowerThreshold = LowerThreshold; }
117
119 double
120 GetLowerThreshold() const { return this->m_LowerThreshold; }
121
122
126 void
127 SetUpperThreshold(double UpperThreshold )
128 { this->m_UpperThreshold = UpperThreshold; }
129
131 double
132 GetUpperThreshold() const { return this->m_UpperThreshold; }
133
134
137 void
138 SetMaximumRMSError(double MaximumRMSError )
139 { this->m_MaximumRMSError = MaximumRMSError; }
140
142 double
143 GetMaximumRMSError() const { return this->m_MaximumRMSError; }
144
145
148 void
149 SetPropagationScaling(double PropagationScaling )
150 { this->m_PropagationScaling = PropagationScaling; }
151
153 double
155
156
159 void
160 SetCurvatureScaling(double CurvatureScaling )
161 { this->m_CurvatureScaling = CurvatureScaling; }
162
164 double
165 GetCurvatureScaling() const { return this->m_CurvatureScaling; }
166
167
170 void
171 SetNumberOfIterations(uint32_t NumberOfIterations )
172 { this->m_NumberOfIterations = NumberOfIterations; }
173
175 uint32_t
177
178
181 void
182 SetReverseExpansionDirection(bool ReverseExpansionDirection )
183 { this->m_ReverseExpansionDirection = ReverseExpansionDirection; }
184
186 void
188 void
192 bool
194
195
201 uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; }
202
208 double GetRMSChange() const { return this->m_RMSChange; }
209
211 std::string GetName() const { return std::string("ThresholdSegmentationLevelSetImageFilter"); }
212
214 std::string ToString() const;
215
216
218#ifndef SWIG
219 Image Execute(Image &&initialImage, const Image &featureImage);
220#endif
221 Image Execute(const Image &initialImage, const Image &featureImage);
222
223
224private:
226 using MemberFunctionType = Image (Self::*)(const Image *
227 initialImage, const Image *
228 featureImage);
229 template <class TImageType> Image ExecuteInternal(const Image *
230 initialImage, const Image *
231 featureImage);
234
235
236 double m_LowerThreshold{ 0.0 };
237
238 double m_UpperThreshold{ 255.0 };
239
240 /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
241 double m_MaximumRMSError{ 0.02 };
242
243 /* Weight of direct propagation contribution to the speed term */
244 double m_PropagationScaling{ 1.0 };
245
246 /* Weight of the curvature contribution to the speed term */
247 double m_CurvatureScaling{ 1.0 };
248
249 /* Number of iterations to run */
250 uint32_t m_NumberOfIterations{ 1000u };
251
252 /* 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. */
254
255
256
257 uint32_t m_ElapsedIterations{ 0 };
258 double m_RMSChange{ 0.0 };
259
260
261
262
263 bool m_InPlace{false};
264
265};
266
267
276#ifndef SWIG
278 Image &&initialImage, const Image &featureImage, 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
279);
280
281
282#endif
284 const Image &initialImage, const Image &featureImage, 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
285);
286
288
289}
290#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
Image Execute(Image &&initialImage, const Image &featureImage)
Image(Self::*)(const Image * initialImage, const Image * featureImage) MemberFunctionType
Image ExecuteInternal(const Image *initialImage, const Image *featureImage)
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
Image Execute(const Image &initialImage, const Image &featureImage)
A class used to instantiate and generate function object to templated member functions.
typelist2::typelist< BasicPixelID< float >, BasicPixelID< double > > RealPixelIDTypeList
Image ThresholdSegmentationLevelSet(Image &&initialImage, const Image &featureImage, 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.
#define SITKBasicFilters_EXPORT