ITK  4.6.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 
90  typedef typename InputImageType::SizeType InputSizeType;
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;
150 
154  void GenerateData();
155 
156 private:
157  VotingBinaryIterativeHoleFillingImageFilter(const Self &); //purposely not
158  // implemented
159  void operator=(const Self &); //purposely not
160 
161  // implemented
162 
164 
167 
170  unsigned int m_MajorityThreshold;
172 };
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 #include "itkVotingBinaryIterativeHoleFillingImageFilter.hxx"
177 #endif
178 
179 #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.
void PrintSelf(std::ostream &os, Indent indent) const
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)