ITK  4.13.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:
61 
63  itkNewMacro(Self);
64 
68 
70  itkStaticConstMacro(ImageDimension, unsigned int,
71  TInputImage::ImageDimension);
72 
74  typedef TInputImage InputImageType;
75  typedef TOutputImage OutputImageType;
76  typedef typename TInputImage::RegionType RegionType;
77  typedef typename TInputImage::SizeType SizeType;
79  typedef typename TInputImage::PixelType PixelType;
80  typedef typename TInputImage::OffsetType OffsetType;
81  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
82 
100 
102  typedef TKernel KernelType;
103 // typedef typename KernelType::Superclass KernelSuperclass;
104 // typedef Neighborhood< typename KernelType::PixelType, ImageDimension >
105 // KernelSuperclass;
106 
108  void SetKernel(const KernelType & kernel) ITK_OVERRIDE;
109 
111  void SetAlgorithm(int algo);
112 
113  itkGetConstMacro(Algorithm, int);
114 
117  virtual void Modified() const ITK_OVERRIDE;
118 
121  BASIC = 0,
122  HISTO = 1,
123  ANCHOR = 2,
124  VHGW = 3
125  };
126 
127 protected:
130  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
131 
132  void GenerateData() ITK_OVERRIDE;
133 
134 private:
135  ITK_DISALLOW_COPY_AND_ASSIGN(MorphologicalGradientImageFilter);
136 
137  // the filters used internally
138  typename HistogramFilterType::Pointer m_HistogramFilter;
139 
140  typename BasicDilateFilterType::Pointer m_BasicDilateFilter;
141 
142  typename BasicErodeFilterType::Pointer m_BasicErodeFilter;
143 
144  typename AnchorDilateFilterType::Pointer m_AnchorDilateFilter;
145 
146  typename AnchorErodeFilterType::Pointer m_AnchorErodeFilter;
147 
148  typename VHGWDilateFilterType::Pointer m_VanHerkGilWermanDilateFilter;
149 
150  typename VHGWErodeFilterType::Pointer m_VanHerkGilWermanErodeFilter;
151 
152  // and the name of the filter
153  int m_Algorithm;
154 }; // end of class
155 } // end namespace itk
156 
157 #ifndef ITK_MANUAL_INSTANTIATION
158 #include "itkMorphologicalGradientImageFilter.hxx"
159 #endif
160 
161 #endif
BasicErodeImageFilter< TInputImage, TInputImage, TKernel > BasicErodeFilterType
gray scale dilation of an image
Pixel-wise subtraction of two images.
VanHerkGilWermanErodeImageFilter< TInputImage, FlatKernelType > VHGWErodeFilterType
SubtractImageFilter< TInputImage, TInputImage, TOutputImage > SubtractFilterType
AnchorErodeImageFilter< TInputImage, FlatKernelType > AnchorErodeFilterType
FlatStructuringElement< itkGetStaticConstMacro(ImageDimension) > FlatKernelType
Base class for all process objects that output image data.
Morphological gradients enhance the variation of pixel intensity in a given neighborhood.
VanHerkGilWermanDilateImageFilter< TInputImage, FlatKernelType > VHGWDilateFilterType
MovingHistogramMorphologicalGradientImageFilter< TInputImage, TOutputImage, TKernel > HistogramFilterType
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
Superclass::OutputImageRegionType OutputImageRegionType
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...
BasicDilateImageFilter< TInputImage, TInputImage, TKernel > BasicDilateFilterType
gray scale erosion of an image
Control indentation during Print() invocation.
Definition: itkIndent.h:49
AnchorDilateImageFilter< TInputImage, FlatKernelType > AnchorDilateFilterType