SimpleITK  
sitkOtsuMultipleThresholdsImageFilter.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 sitkOtsuMultipleThresholdsImageFilter_h
19#define sitkOtsuMultipleThresholdsImageFilter_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
61public:
63
66
70
73
74
75
76
80 void
81 SetNumberOfThresholds(uint8_t NumberOfThresholds )
82 { this->m_NumberOfThresholds = NumberOfThresholds; }
83
86 uint8_t
88
89
93 void
94 SetLabelOffset(uint8_t LabelOffset )
95 { this->m_LabelOffset = LabelOffset; }
96
99 uint8_t
100 GetLabelOffset() const { return this->m_LabelOffset; }
101
102
106 void
107 SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins )
108 { this->m_NumberOfHistogramBins = NumberOfHistogramBins; }
109
112 uint32_t
114
115
119 void
120 SetValleyEmphasis(bool ValleyEmphasis )
121 { this->m_ValleyEmphasis = ValleyEmphasis; }
122
124 void
125 ValleyEmphasisOn() { return this->SetValleyEmphasis(true); }
126 void
127 ValleyEmphasisOff() { return this->SetValleyEmphasis(false); }
131 bool
132 GetValleyEmphasis() const { return this->m_ValleyEmphasis; }
133
134
138 void
139 SetReturnBinMidpoint(bool ReturnBinMidpoint )
140 { this->m_ReturnBinMidpoint = ReturnBinMidpoint; }
141
143 void
145 void
150 bool
152
153
160 std::vector<double> GetThresholds() const { return this->m_Thresholds; }
161
163 std::string GetName() const { return std::string("OtsuMultipleThresholdsImageFilter"); }
164
166 std::string ToString() const;
167
168
170 Image Execute(const Image &image1);
171
172
173private:
175 using MemberFunctionType = Image (Self::*)(const Image &image1);
176 template <class TImageType> Image ExecuteInternal(const Image &image1);
179
180
181 uint8_t m_NumberOfThresholds{ 1u };
182
183 uint8_t m_LabelOffset{ 0u };
184
185 uint32_t m_NumberOfHistogramBins{ 128u };
186
187 bool m_ValleyEmphasis{ false };
188
189 bool m_ReturnBinMidpoint{ false };
190
191
192
193 std::vector<double> m_Thresholds{ std::vector<double>() };
194
195
196
197
198};
199
200
210 const Image &image1, uint8_t numberOfThresholds = 1u, uint8_t labelOffset = 0u, uint32_t numberOfHistogramBins = 128u, bool valleyEmphasis = false, bool returnBinMidpoint = false
211);
212
214
215}
216#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
Image ExecuteInternal(const Image &image1)
A class used to instantiate and generate function object to templated member functions.
Image OtsuMultipleThresholds(const Image &image1, uint8_t numberOfThresholds=1u, uint8_t labelOffset=0u, uint32_t numberOfHistogramBins=128u, bool valleyEmphasis=false, bool returnBinMidpoint=false)
Threshold an image using multiple Otsu Thresholds.
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