ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkGrayscaleDilateImageFilter.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 itkGrayscaleDilateImageFilter_h
19 #define itkGrayscaleDilateImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
26 #include "itkCastImageFilter.h"
28 #include "itkNeighborhood.h"
29 
30 namespace itk
31 {
52 template< typename TInputImage, typename TOutputImage, typename TKernel >
53 class ITK_TEMPLATE_EXPORT GrayscaleDilateImageFilter:
54  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
55 {
56 public:
62 
64  itkNewMacro(Self);
65 
67  itkTypeMacro(GrayscaleDilateImageFilter,
69 
71  itkStaticConstMacro(ImageDimension, unsigned int,
72  TInputImage::ImageDimension);
73 
75  typedef TInputImage InputImageType;
76  typedef TOutputImage OutputImageType;
77  typedef typename TInputImage::RegionType RegionType;
78  typedef typename TInputImage::SizeType SizeType;
80  typedef typename TInputImage::PixelType PixelType;
81  typedef typename TInputImage::OffsetType OffsetType;
82  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
83 
88 
90 
94 
99 
101  typedef TKernel KernelType;
102 // typedef typename KernelType::Superclass KernelSuperclass;
103 // typedef Neighborhood< typename KernelType::PixelType, ImageDimension >
104 // KernelSuperclass;
105 
107  void SetKernel(const KernelType & kernel) ITK_OVERRIDE;
108 
110  void SetBoundary(const PixelType value);
111 
112  itkGetConstMacro(Boundary, PixelType);
113 
115  void SetAlgorithm(int algo);
116 
117  itkGetConstMacro(Algorithm, int);
118 
120  virtual void Modified() const ITK_OVERRIDE;
121 
124  BASIC = 0,
125  HISTO = 1,
126  ANCHOR = 2,
127  VHGW = 3
128  };
129 
130  void SetNumberOfThreads(ThreadIdType nb) ITK_OVERRIDE;
131 
132 protected:
134  ~GrayscaleDilateImageFilter() ITK_OVERRIDE {}
135  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
136 
137  void GenerateData() ITK_OVERRIDE;
138 
139 private:
140  ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleDilateImageFilter);
141 
142  PixelType m_Boundary;
143 
144  // the filters used internally
145  typename HistogramFilterType::Pointer m_HistogramFilter;
146 
147  typename BasicFilterType::Pointer m_BasicFilter;
148 
149  typename AnchorFilterType::Pointer m_AnchorFilter;
150 
151  typename VHGWFilterType::Pointer m_VHGWFilter;
152 
153  // and the name of the filter
154  int m_Algorithm;
155 
156  // the boundary condition need to be stored here
157  DefaultBoundaryConditionType m_BoundaryCondition;
158 }; // end of class
159 } // end namespace itk
160 
161 #ifndef ITK_MANUAL_INSTANTIATION
162 #include "itkGrayscaleDilateImageFilter.hxx"
163 #endif
164 
165 #endif
ImageBoundaryCondition< InputImageType > * ImageBoundaryConditionPointerType
gray scale dilation of an image
FlatStructuringElement< itkGetStaticConstMacro(ImageDimension) > FlatKernelType
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
Base class for all process objects that output image data.
CastImageFilter< TInputImage, TOutputImage > CastFilterType
Superclass::OutputImageRegionType OutputImageRegionType
MovingHistogramDilateImageFilter< TInputImage, TOutputImage, TKernel > HistogramFilterType
VanHerkGilWermanDilateImageFilter< TInputImage, FlatKernelType > VHGWFilterType
ImageBoundaryCondition< InputImageType > const * ImageBoundaryConditionConstPointerType
ConstantBoundaryCondition< InputImageType > DefaultBoundaryConditionType
A base class for all the filters working on an arbitrary shaped neighborhood.
BasicDilateImageFilter< TInputImage, TOutputImage, TKernel > BasicFilterType
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
A class to support a variety of flat structuring elements, including versions created by decompositio...
AnchorDilateImageFilter< TInputImage, FlatKernelType > AnchorFilterType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Grayscale dilation of an image.
Casts input pixels to output pixel type.