ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkGrayscaleMorphologicalClosingImageFilter.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 itkGrayscaleMorphologicalClosingImageFilter_h
19 #define itkGrayscaleMorphologicalClosingImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
29 #include "itkCastImageFilter.h"
31 #include "itkNeighborhood.h"
32 
33 namespace itk
34 {
51 template< typename TInputImage, typename TOutputImage, typename TKernel >
53  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
54 {
55 public:
61 
63  itkNewMacro(Self);
64 
68 
70  itkStaticConstMacro(ImageDimension, unsigned int,
71  TInputImage::ImageDimension);
72 
75  BASIC = 0,
76  HISTO = 1,
77  ANCHOR = 2,
78  VHGW = 3
79  };
80 
82  typedef TInputImage InputImageType;
83  typedef TOutputImage OutputImageType;
84  typedef typename TInputImage::RegionType RegionType;
85  typedef typename TInputImage::SizeType SizeType;
86  typedef typename TInputImage::IndexType IndexType;
87  typedef typename TInputImage::PixelType PixelType;
88  typedef typename TInputImage::OffsetType OffsetType;
90 
107 
109  typedef TKernel KernelType;
110 // typedef typename KernelType::Superclass KernelSuperClass;
111 // typedef Neighborhood< typename KernelType::PixelType, ImageDimension >
112 // KernelSuperClass;
113 
115  void SetKernel(const KernelType & kernel) ITK_OVERRIDE;
116 
118  void SetAlgorithm(int algo);
119  itkGetConstMacro(Algorithm, int);
121 
124  virtual void Modified() const ITK_OVERRIDE;
125 
128  itkSetMacro(SafeBorder, bool);
129  itkGetConstReferenceMacro(SafeBorder, bool);
130  itkBooleanMacro(SafeBorder);
132 
133 protected:
135  ~GrayscaleMorphologicalClosingImageFilter() {}
136  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
137 
138  void GenerateData() ITK_OVERRIDE;
139 
140 private:
141  GrayscaleMorphologicalClosingImageFilter(const Self &); //purposely not
142  // implemented
143  void operator=(const Self &); //purposely not
144 
145  // implemented
146 
147  // the filters used internally
149 
151 
153 
155 
157 
159 
161 
162  // and the name of the filter
164 
166 }; // end of class
167 } // end namespace itk
168 
169 #ifndef ITK_MANUAL_INSTANTIATION
170 #include "itkGrayscaleMorphologicalClosingImageFilter.hxx"
171 #endif
172 
173 #endif
VanHerkGilWermanDilateImageFilter< TInputImage, FlatKernelType > VanHerkGilWermanDilateFilterType
gray scale dilation of an image
FlatStructuringElement< itkGetStaticConstMacro(ImageDimension) > FlatKernelType
VanHerkGilWermanDilateFilterType::Pointer m_VanHerkGilWermanDilateFilter
BasicDilateImageFilter< TInputImage, TInputImage, TKernel > BasicDilateFilterType
MovingHistogramDilateImageFilter< TInputImage, TOutputImage, TKernel > HistogramDilateFilterType
Base class for all process objects that output image data.
BasicErodeImageFilter< TInputImage, TOutputImage, TKernel > BasicErodeFilterType
virtual void Modified() const override
void SetKernel(const KernelType &kernel) override
MovingHistogramErodeImageFilter< TInputImage, TOutputImage, TKernel > HistogramErodeFilterType
void PrintSelf(std::ostream &os, Indent indent) const override
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
VanHerkGilWermanErodeImageFilter< TInputImage, FlatKernelType > VanHerkGilWermanErodeFilterType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::OutputImageRegionType OutputImageRegionType
AnchorCloseImageFilter< TInputImage, FlatKernelType > AnchorFilterType
KernelImageFilter< TInputImage, TOutputImage, TKernel > Superclass
Casts input pixels to output pixel type.