ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkVotingBinaryHoleFillingImageFilter.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 __itkVotingBinaryHoleFillingImageFilter_h
19 #define __itkVotingBinaryHoleFillingImageFilter_h
20 
22 #include "itkArray.h"
23 
24 namespace itk
25 {
40 template< typename TInputImage, typename TOutputImage >
42  public VotingBinaryImageFilter< TInputImage, TOutputImage >
43 {
44 public:
46  itkStaticConstMacro(InputImageDimension, unsigned int,
47  TInputImage::ImageDimension);
48  itkStaticConstMacro(OutputImageDimension, unsigned int,
49  TOutputImage::ImageDimension);
51 
53  typedef TInputImage InputImageType;
54  typedef TOutputImage OutputImageType;
55 
61 
63  itkNewMacro(Self);
64 
67 
69  typedef typename InputImageType::PixelType InputPixelType;
70  typedef typename OutputImageType::PixelType OutputPixelType;
71 
72  typedef typename InputImageType::RegionType InputImageRegionType;
73  typedef typename OutputImageType::RegionType OutputImageRegionType;
74 
75  typedef typename InputImageType::SizeType InputSizeType;
77 
84  itkGetConstReferenceMacro(MajorityThreshold, unsigned int);
85  itkSetMacro(MajorityThreshold, unsigned int);
87 
89  itkGetConstReferenceMacro(NumberOfPixelsChanged, SizeValueType);
90 
91 #ifdef ITK_USE_CONCEPT_CHECKING
92  // Begin concept checking
93  itkConceptMacro( IntConvertibleToInputCheck,
95  itkConceptMacro( UnsignedIntConvertibleToInputCheck,
97  // End concept checking
98 #endif
99 
100 protected:
103  void PrintSelf(std::ostream & os, Indent indent) const;
104 
108  void SetBirthThreshold(const unsigned int value)
109  { this->Superclass::SetBirthThreshold(value); }
110  void SetSurvivalThreshold(const unsigned int value)
111  { this->Superclass::SetSurvivalThreshold(value); }
113 
124  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
125  ThreadIdType threadId);
126 
130 
132 
133 private:
134  VotingBinaryHoleFillingImageFilter(const Self &); //purposely not implemented
135  void operator=(const Self &); //purposely not implemented
136 
137  unsigned int m_MajorityThreshold;
138 
140 
141  // Auxiliary array for multi-threading
143 };
144 } // end namespace itk
145 
146 #ifndef ITK_MANUAL_INSTANTIATION
147 #include "itkVotingBinaryHoleFillingImageFilter.hxx"
148 #endif
149 
150 #endif
Base class for all process objects that output image data.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
Fills in holes and cavities by applying a voting operation on each pixel.
virtual void SetBirthThreshold(unsigned int _arg)
VotingBinaryImageFilter< InputImageType, OutputImageType > Superclass
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
virtual void SetSurvivalThreshold(unsigned int _arg)
void PrintSelf(std::ostream &os, Indent indent) const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Applies a voting operation in a neighborhood of each pixel.
#define itkConceptMacro(name, concept)
unsigned int ThreadIdType
Definition: itkIntTypes.h:159