ITK  4.2.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< class TInputImage, class TOutputImage >
39 class ITK_EXPORT VotingBinaryImageFilter:
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()
113 
114 #ifdef ITK_USE_CONCEPT_CHECKING
115 
116  itkConceptMacro( InputEqualityComparableCheck,
118  itkConceptMacro( IntConvertibleToInputCheck,
120  itkConceptMacro( InputConvertibleToOutputCheck,
122  itkConceptMacro( SameDimensionCheck,
124  itkConceptMacro( InputOStreamWritableCheck,
126 
128 #endif
129 protected:
132  void PrintSelf(std::ostream & os, Indent indent) const;
134 
145  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
146  ThreadIdType threadId);
147 
148 private:
149  VotingBinaryImageFilter(const Self &); //purposely not implemented
150  void operator=(const Self &); //purposely not implemented
151 
153 
156 
157  unsigned int m_BirthThreshold;
158  unsigned int m_SurvivalThreshold;
159 };
160 } // end namespace itk
161 
162 #ifndef ITK_MANUAL_INSTANTIATION
163 #include "itkVotingBinaryImageFilter.hxx"
164 #endif
165 
166 #endif
167