ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkBinaryErodeImageFilter.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 itkBinaryErodeImageFilter_h
19 #define itkBinaryErodeImageFilter_h
20 
21 #include <vector>
22 #include <queue>
25 
26 namespace itk
27 {
66 template< typename TInputImage, typename TOutputImage, typename TKernel >
68  public BinaryMorphologyImageFilter< TInputImage, TOutputImage, TKernel >
69 {
70 public:
71 
73  itkStaticConstMacro(InputImageDimension, unsigned int,
74  TInputImage::ImageDimension);
75  itkStaticConstMacro(OutputImageDimension, unsigned int,
76  TOutputImage::ImageDimension);
78 
80  itkStaticConstMacro(KernelDimension, unsigned int,
81  TKernel::NeighborhoodDimension);
82 
84  typedef TInputImage InputImageType;
85  typedef TOutputImage OutputImageType;
86  typedef TKernel KernelType;
87 
92 
95 
97  itkNewMacro(Self);
98 
101 
103  typedef typename KernelType::ConstIterator KernelIteratorType;
104 
106  typedef typename InputImageType::PixelType InputPixelType;
107  typedef typename OutputImageType::PixelType OutputPixelType;
109  typedef typename InputImageType::OffsetType OffsetType;
110  typedef typename InputImageType::IndexType IndexType;
111 
112  typedef typename InputImageType::RegionType InputImageRegionType;
113  typedef typename OutputImageType::RegionType OutputImageRegionType;
114  typedef typename InputImageType::SizeType InputSizeType;
115 
119  void SetErodeValue(const InputPixelType & value)
120  { this->SetForegroundValue(value); }
121 
126  { return this->GetForegroundValue(); }
127 
128 protected:
131  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
132 
133  void GenerateData() ITK_OVERRIDE;
134 
135  // type inherited from the superclass
137 
138 private:
139  BinaryErodeImageFilter(const Self &); //purposely not implemented
140  void operator=(const Self &); //purposely not implemented
141 };
142 } // end namespace itk
143 
144 #ifndef ITK_MANUAL_INSTANTIATION
145 #include "itkBinaryErodeImageFilter.hxx"
146 #endif
147 
148 #endif
static const unsigned int KernelDimension
typedef(Concept::SameDimension< itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) >) ImageDimensionCheck
void PrintSelf(std::ostream &os, Indent indent) const override
TInputImage::PixelType InputPixelType
static const unsigned int OutputImageDimension
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
void GenerateData() override
OutputImageType::PixelType OutputPixelType
Base class for all process objects that output image data.
InputImageType::PixelType InputPixelType
static const unsigned int InputImageDimension
InputImageType::SizeType InputSizeType
Superclass::NeighborIndexContainer NeighborIndexContainer
InputImageType::IndexType IndexType
void SetErodeValue(const InputPixelType &value)
virtual InputPixelType GetForegroundValue() const
SmartPointer< const Self > ConstPointer
NumericTraits< InputPixelType >::RealType InputRealType
virtual void SetForegroundValue(InputPixelType _arg)
InputImageType::OffsetType OffsetType
InputImageType::RegionType InputImageRegionType
Base class for fast binary dilation and erosion.
KernelType::ConstIterator KernelIteratorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Define additional traits for native types such as int or float.
OutputImageType::RegionType OutputImageRegionType
BinaryMorphologyImageFilter< InputImageType, OutputImageType, KernelType > Superclass
InputPixelType GetErodeValue() const