ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkMorphologyImageFilter.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 itkMorphologyImageFilter_h
19 #define itkMorphologyImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
23 #include "itkNeighborhood.h"
24 #include "itkConstSliceIterator.h"
26 #include "itkImageRegionIterator.h"
27 
28 namespace itk
29 {
71 template< typename TInputImage, typename TOutputImage, typename TKernel >
73  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
74 {
75 public:
81 
84 
86  typedef TInputImage InputImageType;
87  typedef TOutputImage OutputImageType;
88  typedef typename TInputImage::RegionType RegionType;
89  typedef typename TInputImage::SizeType SizeType;
90  typedef typename TInputImage::IndexType IndexType;
91  typedef typename TInputImage::PixelType PixelType;
93 
95  itkStaticConstMacro(ImageDimension, unsigned int,
96  TInputImage::ImageDimension);
97 
102 
105 
107  typedef TKernel KernelType;
108 
110  typedef typename KernelType::ConstIterator KernelIteratorType;
111 
113  typedef typename KernelType::SizeType RadiusType;
114 
121  {
123  }
124 
127  {
129  }
130 
132  itkGetConstMacro(BoundaryCondition, ImageBoundaryConditionPointerType);
133 
134 protected:
137  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
138 
141  outputRegionForThread,
142  ThreadIdType threadId) ITK_OVERRIDE;
143 
146  virtual PixelType Evaluate(const NeighborhoodIteratorType & nit,
147  const KernelIteratorType kernelBegin,
148  const KernelIteratorType kernelEnd) = 0;
149 
150 private:
151  MorphologyImageFilter(const Self &); //purposely not implemented
152  void operator=(const Self &); //purposely not implemented
153 
157 
160 }; // end of class
161 } // end namespace itk
162 
163 #ifndef ITK_MANUAL_INSTANTIATION
164 #include "itkMorphologyImageFilter.hxx"
165 #endif
166 
167 #endif
TInputImage::IndexType IndexType
SmartPointer< const Self > ConstPointer
void operator=(const Self &)
ConstantBoundaryCondition< InputImageType > DefaultBoundaryConditionType
void OverrideBoundaryCondition(const ImageBoundaryConditionPointerType i)
ImageBoundaryConditionPointerType m_BoundaryCondition
ImageBoundaryCondition< InputImageType > * ImageBoundaryConditionPointerType
DefaultBoundaryConditionType m_DefaultBoundaryCondition
Superclass::OutputImageRegionType OutputImageRegionType
KernelType::ConstIterator KernelIteratorType
Base class for the morphological operations such as erosion and dialation.
ConstNeighborhoodIterator< TInputImage > NeighborhoodIteratorType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
virtual PixelType Evaluate(const NeighborhoodIteratorType &nit, const KernelIteratorType kernelBegin, const KernelIteratorType kernelEnd)=0
TInputImage::RegionType RegionType
static const unsigned int ImageDimension
A base class for all the filters working on an arbitrary shaped neighborhood.
ImageBoundaryCondition< InputImageType > const * ImageBoundaryConditionConstPointerType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
TInputImage::PixelType PixelType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::OutputImageRegionType OutputImageRegionType
void PrintSelf(std::ostream &os, Indent indent) const override