ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGrayscaleErodeImageFilter.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 itkGrayscaleErodeImageFilter_h
19 #define itkGrayscaleErodeImageFilter_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 GrayscaleErodeImageFilter:
54  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleErodeImageFilter);
58 
64 
66  itkNewMacro(Self);
67 
69  itkTypeMacro(GrayscaleErodeImageFilter,
71 
73  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
74 
76  using InputImageType = TInputImage;
77  using OutputImageType = TOutputImage;
79  using SizeType = typename TInputImage::SizeType;
81  using PixelType = typename TInputImage::PixelType;
82  using OffsetType = typename TInputImage::OffsetType;
83  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
84 
87  BASIC = 0,
88  HISTO = 1,
89  ANCHOR = 2,
90  VHGW = 3
91  };
92 
93  using HistogramFilterType =
95  using BasicFilterType =
97 
99 
103 
108 
110  using KernelType = TKernel;
111 // using KernelSuperclass = typename KernelType::Superclass;
112 // using KernelSuperclass = Neighborhood< typename KernelType::PixelType, ImageDimension >;
113 
115  void SetKernel(const KernelType & kernel) override;
116 
118  void SetBoundary(const PixelType value);
119 
120  itkGetConstMacro(Boundary, PixelType);
121 
123  void SetAlgorithm(int algo);
124 
125  itkGetConstMacro(Algorithm, int);
126 
128  void Modified() const override;
129 
130  void SetNumberOfWorkUnits(ThreadIdType nb) override;
131 
132 protected:
134  ~GrayscaleErodeImageFilter() override = default;
135  void PrintSelf(std::ostream & os, Indent indent) const override;
136 
137  void GenerateData() override;
138 
139 private:
141 
142  // the filters used internally
144 
146 
148 
150 
151  // and the name of the filter
153 
154  // the boundary condition need to be stored here
156 }; // end of class
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkGrayscaleErodeImageFilter.hxx"
161 #endif
162 
163 #endif
typename TInputImage::IndexType IndexType
typename TInputImage::RegionType RegionType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
DefaultBoundaryConditionType m_BoundaryCondition
typename TInputImage::OffsetType OffsetType
typename OutputImageType::RegionType OutputImageRegionType
typename TInputImage::SizeType SizeType
TOutputImage OutputImageType
A base class for all the filters working on an arbitrary shaped neighborhood.
typename TInputImage::PixelType PixelType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
A class to support a variety of flat structuring elements, including versions created by decompositio...
HistogramFilterType::Pointer m_HistogramFilter
gray scale erosion of an image
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Grayscale erosion of an image.
Casts input pixels to output pixel type.