ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkIntermodesThresholdCalculator.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 * https://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
19#ifndef itkIntermodesThresholdCalculator_h
20#define itkIntermodesThresholdCalculator_h
21
23
24namespace itk
25{
26
52template <typename THistogram, typename TOutput = double>
53class ITK_TEMPLATE_EXPORT IntermodesThresholdCalculator : public HistogramThresholdCalculator<THistogram, TOutput>
54{
55public:
56 ITK_DISALLOW_COPY_AND_MOVE(IntermodesThresholdCalculator);
57
63
65 itkNewMacro(Self);
66
68 itkOverrideGetNameOfClassMacro(IntermodesThresholdCalculator);
69
71 using HistogramType = THistogram;
72 using OutputType = TOutput;
73
74 using InstanceIdentifier = typename HistogramType::InstanceIdentifier;
75
76 itkSetMacro(MaximumSmoothingIterations, SizeValueType);
77 itkGetConstMacro(MaximumSmoothingIterations, SizeValueType);
78
81 itkSetMacro(UseInterMode, bool);
82 itkGetConstMacro(UseInterMode, bool);
83 itkBooleanMacro(UseInterMode);
85
86protected:
92
93 ~IntermodesThresholdCalculator() override = default;
94
95 void
96 GenerateData() override;
97 void
98 PrintSelf(std::ostream & os, Indent indent) const override;
99
100 using TotalAbsoluteFrequencyType = typename HistogramType::TotalAbsoluteFrequencyType;
101 using AbsoluteFrequencyType = typename HistogramType::AbsoluteFrequencyType;
102
103private:
104 bool
105 BimodalTest(const std::vector<double> & h);
106
109};
110
111} // end namespace itk
112
113
114#ifndef ITK_MANUAL_INSTANTIATION
115# include "itkIntermodesThresholdCalculator.hxx"
116#endif
117
118#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
typename HistogramType::TotalAbsoluteFrequencyType TotalAbsoluteFrequencyType
~IntermodesThresholdCalculator() override=default
HistogramThresholdCalculator< THistogram, TOutput > Superclass
typename HistogramType::AbsoluteFrequencyType AbsoluteFrequencyType
void PrintSelf(std::ostream &os, Indent indent) const override
bool BimodalTest(const std::vector< double > &h)
typename HistogramType::InstanceIdentifier InstanceIdentifier
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86