ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkVotingBinaryImageFilter.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 itkVotingBinaryImageFilter_h
19 #define itkVotingBinaryImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
38 template< typename TInputImage, typename TOutputImage >
40  public ImageToImageFilter< TInputImage, TOutputImage >
41 {
42 public:
44  itkStaticConstMacro(InputImageDimension, unsigned int,
45  TInputImage::ImageDimension);
46  itkStaticConstMacro(OutputImageDimension, unsigned int,
47  TOutputImage::ImageDimension);
49 
51  typedef TInputImage InputImageType;
52  typedef TOutputImage OutputImageType;
53 
59 
61  itkNewMacro(Self);
62 
65 
67  typedef typename InputImageType::PixelType InputPixelType;
68  typedef typename OutputImageType::PixelType OutputPixelType;
69 
70  typedef typename InputImageType::RegionType InputImageRegionType;
71  typedef typename OutputImageType::RegionType OutputImageRegionType;
72 
73  typedef typename InputImageType::SizeType InputSizeType;
74 
76  itkSetMacro(Radius, InputSizeType);
77 
79  itkGetConstReferenceMacro(Radius, InputSizeType);
80 
83  itkSetMacro(BackgroundValue, InputPixelType);
84  itkSetMacro(ForegroundValue, InputPixelType);
86 
89  itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
90  itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
92 
95  itkGetConstReferenceMacro(BirthThreshold, unsigned int);
96  itkSetMacro(BirthThreshold, unsigned int);
98 
101  itkGetConstReferenceMacro(SurvivalThreshold, unsigned int);
102  itkSetMacro(SurvivalThreshold, unsigned int);
104 
111  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
112 
113 #ifdef ITK_USE_CONCEPT_CHECKING
114  // Begin concept checking
115  itkConceptMacro( InputEqualityComparableCheck,
117  itkConceptMacro( IntConvertibleToInputCheck,
119  itkConceptMacro( InputConvertibleToOutputCheck,
121  itkConceptMacro( SameDimensionCheck,
123  itkConceptMacro( InputOStreamWritableCheck,
125  // End concept checking
126 #endif
127 
128 protected:
131  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
132 
143  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
144  ThreadIdType threadId) ITK_OVERRIDE;
145 
146 private:
147  VotingBinaryImageFilter(const Self &) ITK_DELETE_FUNCTION;
148  void operator=(const Self &) ITK_DELETE_FUNCTION;
149 
151 
154 
155  unsigned int m_BirthThreshold;
156  unsigned int m_SurvivalThreshold;
157 };
158 } // end namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkVotingBinaryImageFilter.hxx"
162 #endif
163 
164 #endif
InputImageType::PixelType InputPixelType
static const unsigned int InputImageDimension
InputImageType::RegionType InputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
InputImageType::SizeType InputSizeType
Base class for all process objects that output image data.
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
static const unsigned int OutputImageDimension
virtual void GenerateInputRequestedRegion() override
ImageToImageFilter< InputImageType, OutputImageType > Superclass
OutputImageType::PixelType OutputPixelType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
OutputImageType::RegionType OutputImageRegionType
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
SmartPointer< const Self > ConstPointer
Applies a voting operation in a neighborhood of each pixel.
#define itkConceptMacro(name, concept)