ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkAdaptiveHistogramEqualizationImageFilter.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#ifndef itkAdaptiveHistogramEqualizationImageFilter_h
19#define itkAdaptiveHistogramEqualizationImageFilter_h
20
23#include "itkImage.h"
24
25namespace itk
26{
69template <typename TImageType, typename TKernel = Neighborhood<bool, TImageType::ImageDimension>>
72 TImageType,
73 TImageType,
74 TKernel,
75 Function::AdaptiveEqualizationHistogram<typename TImageType::PixelType, typename TImageType::PixelType>>
76{
77public:
78 ITK_DISALLOW_COPY_AND_MOVE(AdaptiveHistogramEqualizationImageFilter);
79
85 TImageType,
86 TImageType,
87 TKernel,
91
92 static constexpr unsigned int ImageDimension = TImageType::ImageDimension;
93
95 itkNewMacro(Self);
96
98 itkOverrideGetNameOfClassMacro(AdaptiveHistogramEqualizationImageFilter);
99
101 using ImageType = TImageType;
102 using InputPixelType = typename ImageType::PixelType;
103 using ImageSizeType = typename ImageType::SizeType;
104
109 itkSetMacro(Alpha, float);
110 itkGetConstMacro(Alpha, float);
117 itkSetMacro(Beta, float);
118 itkGetConstMacro(Beta, float);
120#if !defined(ITK_FUTURE_LEGACY_REMOVE)
126 virtual void
127 SetUseLookupTable(const bool _arg)
128 {
129 itkDebugMacro("setting UseLookupTable to " << _arg);
130 itkGenericLegacyReplaceBodyMacro("UseLookupTable", "", "nothing");
131 if (this->m_UseLookupTable != _arg)
132 {
133 this->m_UseLookupTable = _arg;
134 this->Modified();
135 }
136 }
138 itkGetConstMacro(UseLookupTable, bool);
139 itkBooleanMacro(UseLookupTable);
140#endif
141
142 void
144 {
145 h.SetAlpha(this->m_Alpha);
146 h.SetBeta(this->m_Beta);
147 h.SetMinimum(this->m_InputMinimum);
148 h.SetMaximum(this->m_InputMaximum);
149
150 typename Superclass::HistogramType::RealType kernelSize = 1;
151 for (unsigned int i = 0; i < ImageDimension; ++i)
152 {
153 kernelSize *= (2 * this->GetRadius()[i] + 1);
154 }
155 h.SetKernelSize(kernelSize);
156 }
157
158protected:
168
170 void
171 PrintSelf(std::ostream & os, Indent indent) const override;
172
176 void
178
179private:
180 float m_Alpha{};
181 float m_Beta{};
182
185
187};
188} // end namespace itk
189
190#ifndef ITK_MANUAL_INSTANTIATION
191# include "itkAdaptiveHistogramEqualizationImageFilter.hxx"
192#endif
193
194#endif
MovingHistogramImageFilter< TImageType, TImageType, TKernel, Function::AdaptiveEqualizationHistogram< typename TImageType::PixelType, typename TImageType::PixelType > > Superclass
void ConfigureHistogram(typename Superclass::HistogramType &h) override
~AdaptiveHistogramEqualizationImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
virtual const RadiusType & GetRadius() const
Control indentation during Print() invocation.
Definition itkIndent.h:51
void SetRadius(const RadiusType &radius) override
Define additional traits for native types such as int or float.
virtual void Modified() const
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....