ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkVotingBinaryHoleFillingImageFilter.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 itkVotingBinaryHoleFillingImageFilter_h
19#define itkVotingBinaryHoleFillingImageFilter_h
20
22#include "itkArray.h"
23
24namespace itk
25{
41template <typename TInputImage, typename TOutputImage>
42class ITK_TEMPLATE_EXPORT VotingBinaryHoleFillingImageFilter : public VotingBinaryImageFilter<TInputImage, TOutputImage>
43{
44public:
45 ITK_DISALLOW_COPY_AND_MOVE(VotingBinaryHoleFillingImageFilter);
46
48 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
49 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
50
52 using InputImageType = TInputImage;
53 using OutputImageType = TOutputImage;
54
60
62 itkNewMacro(Self);
63
65 itkOverrideGetNameOfClassMacro(VotingBinaryHoleFillingImageFilter);
66
68 using InputPixelType = typename InputImageType::PixelType;
69 using OutputPixelType = typename OutputImageType::PixelType;
70
71 using InputImageRegionType = typename InputImageType::RegionType;
72 using OutputImageRegionType = typename OutputImageType::RegionType;
73
74 using InputSizeType = typename InputImageType::SizeType;
75 using SizeValueType = typename InputImageType::SizeValueType;
76
83 itkGetConstReferenceMacro(MajorityThreshold, unsigned int);
84 itkSetMacro(MajorityThreshold, unsigned int);
86
88 itkGetConstReferenceMacro(NumberOfPixelsChanged, SizeValueType);
89
91 itkConceptMacro(UnsignedIntConvertibleToInputCheck, (Concept::Convertible<unsigned int, InputPixelType>));
92
93protected:
96 void
97 PrintSelf(std::ostream & os, Indent indent) const override;
98
102 void
103 SetBirthThreshold(const unsigned int value) override
104 {
106 }
107 void
108 SetSurvivalThreshold(const unsigned int value) override
109 {
111 }
112
113
124 void
125 ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override;
126
127 void
129 {
130 itkExceptionMacro("This class requires threadId so it must use classic multi-threading model");
131 }
132
135 void
137
138 void
140
141private:
142 unsigned int m_MajorityThreshold{};
143
145
146 // Auxiliary array for multi-threading
148};
149} // end namespace itk
150
151#ifndef ITK_MANUAL_INSTANTIATION
152# include "itkVotingBinaryHoleFillingImageFilter.hxx"
153#endif
154
155#endif
Array class with size defined at construction time.
Definition itkArray.h:48
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
void DynamicThreadedGenerateData(const OutputImageRegionType &) override
VotingBinaryImageFilter< InputImageType, OutputImageType > Superclass
~VotingBinaryHoleFillingImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
void SetBirthThreshold(const unsigned int value) override
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
void SetSurvivalThreshold(const unsigned int value) override
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType