ITK  4.13.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 
61  typedef TImage InputImageType;
62  typedef TImage OutputImageType;
63 
69 
71  itkNewMacro(Self);
72 
75 
82 
84  typedef typename InputImageType::PixelType InputPixelType;
85  typedef typename OutputImageType::PixelType OutputPixelType;
86 
87  typedef typename InputImageType::RegionType InputImageRegionType;
88  typedef typename OutputImageType::RegionType OutputImageRegionType;
89 
91 
95  itkGetConstReferenceMacro(MaximumNumberOfIterations, unsigned int);
96  itkSetMacro(MaximumNumberOfIterations, unsigned int);
98 
102  itkGetConstReferenceMacro(CurrentNumberOfIterations, unsigned int);
103  itkSetMacro(CurrentNumberOfIterations, unsigned int);
105 
107  itkSetMacro(Radius, InputSizeType);
108 
110  itkGetConstReferenceMacro(Radius, InputSizeType);
111 
114  itkSetMacro(BackgroundValue, InputPixelType);
115  itkSetMacro(ForegroundValue, InputPixelType);
117 
120  itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
121  itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
123 
130  itkGetConstReferenceMacro(MajorityThreshold, unsigned int);
131  itkSetMacro(MajorityThreshold, unsigned int);
133 
135  itkGetConstReferenceMacro(NumberOfPixelsChanged, unsigned int);
136 
137 #ifdef ITK_USE_CONCEPT_CHECKING
138  // Begin concept checking
139  itkConceptMacro( InputEqualityComparableCheck,
141  itkConceptMacro( InputOStreamWritableeCheck,
143  // End concept checking
144 #endif
145 
146 protected:
149  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
150 
154  void GenerateData() ITK_OVERRIDE;
155 
156 private:
157  ITK_DISALLOW_COPY_AND_ASSIGN(VotingBinaryIterativeHoleFillingImageFilter);
158 
159  InputSizeType m_Radius;
160 
161  InputPixelType m_ForegroundValue;
162  InputPixelType m_BackgroundValue;
163 
164  unsigned int m_MaximumNumberOfIterations;
165  unsigned int m_CurrentNumberOfIterations;
166  unsigned int m_MajorityThreshold;
167  unsigned int m_NumberOfPixelsChanged;
168 };
169 } // end namespace itk
170 
171 #ifndef ITK_MANUAL_INSTANTIATION
172 #include "itkVotingBinaryIterativeHoleFillingImageFilter.hxx"
173 #endif
174 
175 #endif
ImageToImageFilter< InputImageType, OutputImageType > Superclass
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
VotingBinaryHoleFillingImageFilter< InputImageType, OutputImageType > VotingFilterType
#define itkConceptMacro(name, concept)