SimpleITK  
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.jinja to make changes.
25 */
26
27#include <memory>
28
29#include "sitkBasicFilters.h"
30#include "sitkImageFilter.h"
32
33namespace itk::simple {
34
141public:
143
146
150
153
154
155
156
160 void
162 { this->m_Threshold = Threshold; }
163
166 double
167 GetThreshold() const { return this->m_Threshold; }
168
169
173 void
174 SetVariance(double Variance )
175 { this->m_Variance = Variance; }
176
179 double
180 GetVariance() const { return this->m_Variance; }
181
182
185 void
186 SetMaximumRMSError(double MaximumRMSError )
187 { this->m_MaximumRMSError = MaximumRMSError; }
188
190 double
191 GetMaximumRMSError() const { return this->m_MaximumRMSError; }
192
193
196 void
197 SetPropagationScaling(double PropagationScaling )
198 { this->m_PropagationScaling = PropagationScaling; }
199
201 double
203
204
207 void
208 SetCurvatureScaling(double CurvatureScaling )
209 { this->m_CurvatureScaling = CurvatureScaling; }
210
212 double
213 GetCurvatureScaling() const { return this->m_CurvatureScaling; }
214
215
218 void
219 SetAdvectionScaling(double AdvectionScaling )
220 { this->m_AdvectionScaling = AdvectionScaling; }
221
223 double
224 GetAdvectionScaling() const { return this->m_AdvectionScaling; }
225
226
229 void
230 SetNumberOfIterations(uint32_t NumberOfIterations )
231 { this->m_NumberOfIterations = NumberOfIterations; }
232
234 uint32_t
236
237
240 void
241 SetReverseExpansionDirection(bool ReverseExpansionDirection )
242 { this->m_ReverseExpansionDirection = ReverseExpansionDirection; }
243
245 void
247 void
251 bool
253
254
257 void
258 SetIsoSurfaceValue(double IsoSurfaceValue )
259 { this->m_IsoSurfaceValue = IsoSurfaceValue; }
260
262 double
263 GetIsoSurfaceValue() const { return this->m_IsoSurfaceValue; }
264
265
271 uint32_t GetElapsedIterations() const { return this->m_ElapsedIterations; }
272
278 double GetRMSChange() const { return this->m_RMSChange; }
279
286 Image GetCannyImage() const { return this->m_CannyImage; }
287
289 std::string GetName() const { return std::string("CannySegmentationLevelSetImageFilter"); }
290
292 std::string ToString() const;
293
294
296#ifndef SWIG
297 Image Execute(Image &&initialImage, const Image &featureImage);
298#endif
299 Image Execute(const Image &initialImage, const Image &featureImage);
300
301
302private:
304 using MemberFunctionType = Image (Self::*)(const Image *
305 initialImage, const Image *
306 featureImage);
307 template <class TImageType> Image ExecuteInternal(const Image *
308 initialImage, const Image *
309 featureImage);
312
313
314 double m_Threshold{ 0.0 };
315
316 double m_Variance{ 0.0 };
317
318 /* Value of RMS change below which the filter should stop. This is a convergence criterion. */
319 double m_MaximumRMSError{ 0.02 };
320
321 /* Weight of direct propagation contribution to the speed term */
322 double m_PropagationScaling{ 1.0 };
323
324 /* Weight of the curvature contribution to the speed term */
325 double m_CurvatureScaling{ 1.0 };
326
327 /* Weight of the advection contribution to the speed term */
328 double m_AdvectionScaling{ 1.0 };
329
330 /* Number of iterations to run */
331 uint32_t m_NumberOfIterations{ 1000u };
332
333 /* 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. */
335
336 double m_IsoSurfaceValue{ 0.0 };
337
338
339
340 uint32_t m_ElapsedIterations{ 0 };
341 double m_RMSChange{ 0.0 };
343
344
345
346
347 bool m_InPlace{false};
348
349};
350
351
360#ifndef SWIG
362 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
363);
364
365
366#endif
368 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
369);
370
372
373}
374#endif
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
Image Execute(Image &&initialImage, const Image &featureImage)
double GetRMSChange() const
The Root Mean Square of the levelset upon termination.
Image(Self::*)(const Image * initialImage, const Image * featureImage) MemberFunctionType
Image Execute(const Image &initialImage, const Image &featureImage)
Image ExecuteInternal(const Image *initialImage, const Image *featureImage)
The Image class for SimpleITK.
Definition sitkImage.h:77
A class used to instantiate and generate function object to templated member functions.
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 outside threshold values.
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.
typelist2::typelist< BasicPixelID< float >, BasicPixelID< double > > RealPixelIDTypeList
#define SITKBasicFilters_EXPORT