ITK  5.2.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  * 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 itkVotingBinaryIterativeHoleFillingImageFilter_h
19 #define itkVotingBinaryIterativeHoleFillingImageFilter_h
20 
22 
23 namespace itk
24 {
55 template <typename TImage>
56 class ITK_TEMPLATE_EXPORT VotingBinaryIterativeHoleFillingImageFilter : public ImageToImageFilter<TImage, TImage>
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_MOVE(VotingBinaryIterativeHoleFillingImageFilter);
60 
62  using InputImageType = TImage;
63  using OutputImageType = TImage;
64 
70 
72  itkNewMacro(Self);
73 
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);
96 
100  itkGetConstReferenceMacro(CurrentNumberOfIterations, unsigned int);
101  itkSetMacro(CurrentNumberOfIterations, unsigned int);
103 
105  itkSetMacro(Radius, InputSizeType);
106 
108  itkGetConstReferenceMacro(Radius, InputSizeType);
109 
112  itkSetMacro(BackgroundValue, InputPixelType);
113  itkSetMacro(ForegroundValue, InputPixelType);
115 
118  itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
119  itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
121 
128  itkGetConstReferenceMacro(MajorityThreshold, unsigned int);
129  itkSetMacro(MajorityThreshold, unsigned int);
131 
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 
142 protected:
144  ~VotingBinaryIterativeHoleFillingImageFilter() override = default;
145  void
146  PrintSelf(std::ostream & os, Indent indent) const override;
147 
151  void
152  GenerateData() override;
153 
154 private:
156 
159 
162  unsigned int m_MajorityThreshold;
164 };
165 } // end namespace itk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 # include "itkVotingBinaryIterativeHoleFillingImageFilter.hxx"
169 #endif
170 
171 #endif
itk::VotingBinaryIterativeHoleFillingImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:85
itk::VotingBinaryIterativeHoleFillingImageFilter::m_ForegroundValue
InputPixelType m_ForegroundValue
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:157
itk::VotingBinaryIterativeHoleFillingImageFilter::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:86
itk::VotingBinaryHoleFillingImageFilter
Fills in holes and cavities by applying a voting operation on each pixel.
Definition: itkVotingBinaryHoleFillingImageFilter.h:42
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:636
itk::VotingBinaryIterativeHoleFillingImageFilter::InputImageType
TImage InputImageType
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:62
itk::VotingBinaryIterativeHoleFillingImageFilter::OutputPixelType
typename OutputImageType::PixelType OutputPixelType
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:83
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::VotingBinaryIterativeHoleFillingImageFilter::OutputImageType
TImage OutputImageType
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:63
itk::VotingBinaryIterativeHoleFillingImageFilter::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:82
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::VotingBinaryIterativeHoleFillingImageFilter::m_BackgroundValue
InputPixelType m_BackgroundValue
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:158
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::VotingBinaryIterativeHoleFillingImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:88
itk::VotingBinaryIterativeHoleFillingImageFilter::m_Radius
InputSizeType m_Radius
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:155
itkVotingBinaryHoleFillingImageFilter.h
itk::VotingBinaryIterativeHoleFillingImageFilter::m_CurrentNumberOfIterations
unsigned int m_CurrentNumberOfIterations
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:161
itk::VotingBinaryIterativeHoleFillingImageFilter::m_MaximumNumberOfIterations
unsigned int m_MaximumNumberOfIterations
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:160
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::VotingBinaryIterativeHoleFillingImageFilter::m_MajorityThreshold
unsigned int m_MajorityThreshold
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:162
itk::VotingBinaryIterativeHoleFillingImageFilter
Fills in holes and cavities by iteratively applying a voting operation.
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:56
itk::Concept::EqualityComparable
Definition: itkConceptChecking.h:306
itk::VotingBinaryIterativeHoleFillingImageFilter::m_NumberOfPixelsChanged
unsigned int m_NumberOfPixelsChanged
Definition: itkVotingBinaryIterativeHoleFillingImageFilter.h:163