ITK  4.6.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);
107 
109  void SetAlgorithm(int algo);
110 
111  itkGetConstMacro(Algorithm, int);
112 
115  virtual void Modified() const;
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;
136 
137  void GenerateData();
138 
139 private:
140  GrayscaleMorphologicalOpeningImageFilter(const Self &); //purposely not
141  // implemented
142  void operator=(const Self &); //purposely not
143 
144  // implemented
145 
146  // the filters used internally
148 
150 
152 
154 
156 
158 
160 
161  // and the name of the filter
163 
165 }; // end of class
166 } // end namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
169 #include "itkGrayscaleMorphologicalOpeningImageFilter.hxx"
170 #endif
171 
172 #endif
gray scale dilation of an image
void SetKernel(const KernelType &kernel)
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
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
Casts input pixels to output pixel type.
void PrintSelf(std::ostream &os, Indent indent) const
FlatStructuringElement< itkGetStaticConstMacro(ImageDimension) > FlatKernelType