ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkGrayscaleMorphologicalOpeningImageFilter.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 itkGrayscaleMorphologicalOpeningImageFilter_h
19 #define itkGrayscaleMorphologicalOpeningImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
30 #include "itkNeighborhood.h"
31 
32 namespace itk
33 {
50 template< typename TInputImage, typename TOutputImage, typename TKernel >
52  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
53 {
54 public:
60 
62  itkNewMacro(Self);
63 
67 
69  itkStaticConstMacro(ImageDimension, unsigned int,
70  TInputImage::ImageDimension);
71 
73  typedef TInputImage InputImageType;
74  typedef TOutputImage OutputImageType;
75  typedef typename TInputImage::RegionType RegionType;
76  typedef typename TInputImage::SizeType SizeType;
77  typedef typename TInputImage::IndexType IndexType;
78  typedef typename TInputImage::PixelType PixelType;
79  typedef typename TInputImage::OffsetType OffsetType;
81 
98 
100  typedef TKernel KernelType;
101 // typedef typename KernelType::Superclass KernelSuperClass;
102 // typedef Neighborhood< typename KernelType::PixelType, ImageDimension >
103 // KernelSuperClass;
104 
106  void SetKernel(const KernelType & kernel) ITK_OVERRIDE;
107 
109  void SetAlgorithm(int algo);
110 
111  itkGetConstMacro(Algorithm, int);
112 
115  virtual void Modified() const ITK_OVERRIDE;
116 
119  BASIC = 0,
120  HISTO = 1,
121  ANCHOR = 2,
122  VHGW = 3
123  };
124 
127  itkSetMacro(SafeBorder, bool);
128  itkGetConstReferenceMacro(SafeBorder, bool);
129  itkBooleanMacro(SafeBorder);
131 
132 protected:
135  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
136 
137  void GenerateData() ITK_OVERRIDE;
138 
139 private:
140  GrayscaleMorphologicalOpeningImageFilter(const Self &) ITK_DELETE_FUNCTION;
141  void operator=(const Self &) ITK_DELETE_FUNCTION;
142 
143  // the filters used internally
145 
147 
149 
151 
153 
155 
157 
158  // and the name of the filter
160 
162 }; // end of class
163 } // end namespace itk
164 
165 #ifndef ITK_MANUAL_INSTANTIATION
166 #include "itkGrayscaleMorphologicalOpeningImageFilter.hxx"
167 #endif
168 
169 #endif
void PrintSelf(std::ostream &os, Indent indent) const override
gray scale dilation of an image
VanHerkGilWermanDilateFilterType::Pointer m_VanHerkGilWermanDilateFilter
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
BasicErodeImageFilter< TInputImage, TInputImage, TKernel > BasicErodeFilterType
Base class for all process objects that output image data.
VanHerkGilWermanDilateImageFilter< TInputImage, FlatKernelType > VanHerkGilWermanDilateFilterType
VanHerkGilWermanErodeImageFilter< TInputImage, FlatKernelType > VanHerkGilWermanErodeFilterType
AnchorOpenImageFilter< TInputImage, FlatKernelType > AnchorFilterType
A base class for all the filters working on an arbitrary shaped neighborhood.
BasicDilateImageFilter< TInputImage, TOutputImage, TKernel > BasicDilateFilterType
MovingHistogramDilateImageFilter< TInputImage, TOutputImage, TKernel > HistogramDilateFilterType
virtual void Modified() const override
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
Superclass::OutputImageRegionType OutputImageRegionType
MovingHistogramErodeImageFilter< TInputImage, TOutputImage, TKernel > HistogramErodeFilterType
void SetKernel(const KernelType &kernel) override
Casts input pixels to output pixel type.
FlatStructuringElement< itkGetStaticConstMacro(ImageDimension) > FlatKernelType