ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkVotingBinaryIterativeHoleFillingImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
54 template< typename TImage >
56  public ImageToImageFilter< TImage, TImage >
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_ASSIGN(VotingBinaryIterativeHoleFillingImageFilter);
60 
62  using InputImageType = TImage;
63  using OutputImageType = TImage;
64 
70 
72  itkNewMacro(Self);
73 
76 
81 
83  using InputPixelType = typename InputImageType::PixelType;
84  using OutputPixelType = typename OutputImageType::PixelType;
85 
88 
90 
94  itkGetConstReferenceMacro(MaximumNumberOfIterations, unsigned int);
95  itkSetMacro(MaximumNumberOfIterations, unsigned int);
97 
101  itkGetConstReferenceMacro(CurrentNumberOfIterations, unsigned int);
102  itkSetMacro(CurrentNumberOfIterations, unsigned int);
104 
106  itkSetMacro(Radius, InputSizeType);
107 
109  itkGetConstReferenceMacro(Radius, InputSizeType);
110 
113  itkSetMacro(BackgroundValue, InputPixelType);
114  itkSetMacro(ForegroundValue, InputPixelType);
116 
119  itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
120  itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
122 
129  itkGetConstReferenceMacro(MajorityThreshold, unsigned int);
130  itkSetMacro(MajorityThreshold, unsigned int);
132 
134  itkGetConstReferenceMacro(NumberOfPixelsChanged, unsigned int);
135 
136 #ifdef ITK_USE_CONCEPT_CHECKING
137  // Begin concept checking
138  itkConceptMacro( InputEqualityComparableCheck,
140  itkConceptMacro( InputOStreamWritableeCheck,
142  // End concept checking
143 #endif
144 
145 protected:
147  ~VotingBinaryIterativeHoleFillingImageFilter() override = default;
148  void PrintSelf(std::ostream & os, Indent indent) const override;
149 
153  void GenerateData() override;
154 
155 private:
157 
160 
163  unsigned int m_MajorityThreshold;
165 };
166 } // end namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
169 #include "itkVotingBinaryIterativeHoleFillingImageFilter.hxx"
170 #endif
171 
172 #endif
Light weight base class for most itk classes.
Fills in holes and cavities by iteratively applying a voting operation.
Fills in holes and cavities by applying a voting operation on each pixel.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)