ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkMorphologicalGradientImageFilter.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 itkMorphologicalGradientImageFilter_h
19 #define itkMorphologicalGradientImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
29 #include "itkSubtractImageFilter.h"
31 #include "itkNeighborhood.h"
32 
33 namespace itk
34 {
51 template< typename TInputImage, typename TOutputImage, typename TKernel >
52 class ITK_TEMPLATE_EXPORT MorphologicalGradientImageFilter:
53  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_ASSIGN(MorphologicalGradientImageFilter);
57 
63 
65  itkNewMacro(Self);
66 
70 
72  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
73 
75  using InputImageType = TInputImage;
76  using OutputImageType = TOutputImage;
78  using SizeType = typename TInputImage::SizeType;
80  using PixelType = typename TInputImage::PixelType;
81  using OffsetType = typename TInputImage::OffsetType;
82  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
83 
84  using FlatKernelType =
86  using HistogramFilterType =
88  using BasicDilateFilterType =
90  using BasicErodeFilterType =
95  using VHGWDilateFilterType =
97  using VHGWErodeFilterType =
99  using SubtractFilterType =
101 
103  using KernelType = TKernel;
104 // using KernelSuperclass = typename KernelType::Superclass;
105 // using KernelSuperclass = Neighborhood< typename KernelType::PixelType, ImageDimension >;
106 
108  void SetKernel(const KernelType & kernel) override;
109 
111  void SetAlgorithm(int algo);
112 
113  itkGetConstMacro(Algorithm, int);
114 
117  void Modified() const override;
118 
121  BASIC = 0,
122  HISTO = 1,
123  ANCHOR = 2,
124  VHGW = 3
125  };
126 
127 protected:
129  ~MorphologicalGradientImageFilter() override = default;
130  void PrintSelf(std::ostream & os, Indent indent) const override;
131 
132  void GenerateData() override;
133 
134 private:
135  // the filters used internally
137 
139 
141 
143 
145 
147 
149 
150  // and the name of the filter
152 }; // end of class
153 } // end namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 #include "itkMorphologicalGradientImageFilter.hxx"
157 #endif
158 
159 #endif
gray scale dilation of an image
Pixel-wise subtraction of two images.
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.
Morphological gradients enhance the variation of pixel intensity in a given neighborhood.
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.
A class to support a variety of flat structuring elements, including versions created by decompositio...
gray scale erosion of an image
Control indentation during Print() invocation.
Definition: itkIndent.h:49