ITK  6.0.0
Insight Toolkit
itkVotingBinaryIterativeHoleFillingImageFilter.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 itkVotingBinaryIterativeHoleFillingImageFilter_h
19#define itkVotingBinaryIterativeHoleFillingImageFilter_h
20
22
23namespace itk
24{
55template <typename TImage>
56class ITK_TEMPLATE_EXPORT VotingBinaryIterativeHoleFillingImageFilter : public ImageToImageFilter<TImage, TImage>
57{
58public:
59 ITK_DISALLOW_COPY_AND_MOVE(VotingBinaryIterativeHoleFillingImageFilter);
60
62 using InputImageType = TImage;
63 using OutputImageType = TImage;
64
70
72 itkNewMacro(Self);
73
75 itkOverrideGetNameOfClassMacro(VotingBinaryIterativeHoleFillingImageFilter);
76
80
82 using InputPixelType = typename InputImageType::PixelType;
83 using OutputPixelType = typename OutputImageType::PixelType;
84
87
89
93 itkGetConstReferenceMacro(MaximumNumberOfIterations, unsigned int);
94 itkSetMacro(MaximumNumberOfIterations, unsigned int);
100 itkGetConstReferenceMacro(CurrentNumberOfIterations, unsigned int);
101 itkSetMacro(CurrentNumberOfIterations, unsigned int);
105 itkSetMacro(Radius, InputSizeType);
106
108 itkGetConstReferenceMacro(Radius, InputSizeType);
109
112 itkSetMacro(BackgroundValue, InputPixelType);
113 itkSetMacro(ForegroundValue, InputPixelType);
118 itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
119 itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
128 itkGetConstReferenceMacro(MajorityThreshold, unsigned int);
129 itkSetMacro(MajorityThreshold, unsigned int);
133 itkGetConstReferenceMacro(NumberOfPixelsChanged, unsigned int);
134
135#ifdef ITK_USE_CONCEPT_CHECKING
136 // Begin concept checking
137 itkConceptMacro(InputEqualityComparableCheck, (Concept::EqualityComparable<InputPixelType>));
138 itkConceptMacro(InputOStreamWritableeCheck, (Concept::OStreamWritable<InputPixelType>));
139 // End concept checking
140#endif
141
142protected:
145 void
146 PrintSelf(std::ostream & os, Indent indent) const override;
147
151 void
152 GenerateData() override;
153
154private:
155 InputSizeType m_Radius{};
156
157 InputPixelType m_ForegroundValue{};
158 InputPixelType m_BackgroundValue{};
159
160 unsigned int m_MaximumNumberOfIterations{};
161 unsigned int m_CurrentNumberOfIterations{};
162 unsigned int m_MajorityThreshold{};
163 unsigned int m_NumberOfPixelsChanged{};
164};
165} // end namespace itk
166
167#ifndef ITK_MANUAL_INSTANTIATION
168# include "itkVotingBinaryIterativeHoleFillingImageFilter.hxx"
169#endif
170
171#endif
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Fills in holes and cavities by applying a voting operation on each pixel.
Fills in holes and cavities by iteratively applying a voting operation.
void PrintSelf(std::ostream &os, Indent indent) const override
~VotingBinaryIterativeHoleFillingImageFilter() override=default
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....