SimpleITK  
sitkYenThresholdImageFilter.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 sitkYenThresholdImageFilter_h
19#define sitkYenThresholdImageFilter_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
56public:
58
61
65
68
69
70
71
75 void
76 SetInsideValue(uint8_t InsideValue )
77 { this->m_InsideValue = InsideValue; }
78
81 uint8_t
82 GetInsideValue() const { return this->m_InsideValue; }
83
84
88 void
89 SetOutsideValue(uint8_t OutsideValue )
90 { this->m_OutsideValue = OutsideValue; }
91
94 uint8_t
95 GetOutsideValue() const { return this->m_OutsideValue; }
96
97
101 void
102 SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins )
103 { this->m_NumberOfHistogramBins = NumberOfHistogramBins; }
104
106 uint32_t
108
109
113 void
114 SetMaskOutput(bool MaskOutput )
115 { this->m_MaskOutput = MaskOutput; }
116
118 void
119 MaskOutputOn() { return this->SetMaskOutput(true); }
120 void
121 MaskOutputOff() { return this->SetMaskOutput(false); }
124 bool
125 GetMaskOutput() const { return this->m_MaskOutput; }
126
127
132 void
133 SetMaskValue(uint8_t MaskValue )
134 { this->m_MaskValue = MaskValue; }
135
137 uint8_t
138 GetMaskValue() const { return this->m_MaskValue; }
139
140
146 double GetThreshold() const { return this->m_Threshold; }
147
149 std::string GetName() const { return std::string("YenThresholdImageFilter"); }
150
152 std::string ToString() const;
153
154
156 Image Execute(const Image &image, const Image &maskImage);
157 Image Execute(const Image &image);
158
159
160private:
162 using MemberFunctionType = Image (Self::*)(const Image *
163 image, const Image *
164 maskImage);
165 template <class TImageType> Image ExecuteInternal(const Image *
166 image, const Image *
167 maskImage);
170
171
172 uint8_t m_InsideValue{ 1u };
173
174 uint8_t m_OutsideValue{ 0u };
175
176 uint32_t m_NumberOfHistogramBins{ 256u };
177
178 bool m_MaskOutput{ true };
179
180 uint8_t m_MaskValue{ 255u };
181
182
183
184 double m_Threshold{ 0.0 };
185
186
187
188
189};
190
191
201 const Image &image, const Image &maskImage, uint8_t insideValue = 1u, uint8_t outsideValue = 0u, uint32_t numberOfHistogramBins = 256u, bool maskOutput = true, uint8_t maskValue = 255u
202);
203
205 const Image &image, uint8_t insideValue = 1u, uint8_t outsideValue = 0u, uint32_t numberOfHistogramBins = 256u, bool maskOutput = true, uint8_t maskValue = 255u
206);
207
209
210}
211#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
Image Execute(const Image &image)
Image ExecuteInternal(const Image *image, const Image *maskImage)
void SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins)
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
double GetThreshold() const
Get the computed threshold.
Image(Self::*)(const Image * image, const Image * maskImage) MemberFunctionType
Image Execute(const Image &image, const Image &maskImage)
A class used to instantiate and generate function object to templated member functions.
Image YenThreshold(const Image &image, const Image &maskImage, uint8_t insideValue=1u, uint8_t outsideValue=0u, uint32_t numberOfHistogramBins=256u, bool maskOutput=true, uint8_t maskValue=255u)
Threshold an image using the Yen Threshold.
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > > BasicPixelIDTypeList
#define SITKBasicFilters_EXPORT