ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkGrayscaleDilateImageFilter.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 itkGrayscaleDilateImageFilter_h
19 #define itkGrayscaleDilateImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
26 #include "itkCastImageFilter.h"
28 #include "itkNeighborhood.h"
29 
30 namespace itk
31 {
52 template< typename TInputImage, typename TOutputImage, typename TKernel >
53 class ITK_TEMPLATE_EXPORT GrayscaleDilateImageFilter:
54  public KernelImageFilter< TInputImage, TOutputImage, TKernel >
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleDilateImageFilter);
58 
64 
66  itkNewMacro(Self);
67 
69  itkTypeMacro(GrayscaleDilateImageFilter,
71 
73  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
74 
76  using InputImageType = TInputImage;
77  using OutputImageType = TOutputImage;
79  using SizeType = typename TInputImage::SizeType;
81  using PixelType = typename TInputImage::PixelType;
82  using OffsetType = typename TInputImage::OffsetType;
83  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
84 
85  using HistogramFilterType =
87  using BasicFilterType =
89 
91 
95 
100 
102  using KernelType = TKernel;
103 // using KernelSuperclass = typename KernelType::Superclass;
104 // using KernelSuperclass = Neighborhood< typename KernelType::PixelType, ImageDimension >;
105 
107  void SetKernel(const KernelType & kernel) override;
108 
110  void SetBoundary(const PixelType value);
111 
112  itkGetConstMacro(Boundary, PixelType);
113 
115  void SetAlgorithm(int algo);
116 
117  itkGetConstMacro(Algorithm, int);
118 
120  void Modified() const override;
121 
124  BASIC = 0,
125  HISTO = 1,
126  ANCHOR = 2,
127  VHGW = 3
128  };
129 
130  void SetNumberOfWorkUnits(ThreadIdType nb) override;
131 
132 protected:
134  ~GrayscaleDilateImageFilter() override = default;
135  void PrintSelf(std::ostream & os, Indent indent) const override;
136 
137  void GenerateData() override;
138 
139 private:
141 
142  // the filters used internally
144 
146 
148 
150 
151  // and the name of the filter
153 
154  // the boundary condition need to be stored here
156 }; // end of class
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkGrayscaleDilateImageFilter.hxx"
161 #endif
162 
163 #endif
gray scale dilation of an image
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.
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.
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
A class to support a variety of flat structuring elements, including versions created by decompositio...
typename TInputImage::PixelType PixelType
DefaultBoundaryConditionType m_BoundaryCondition
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Grayscale dilation of an image.
HistogramFilterType::Pointer m_HistogramFilter
Casts input pixels to output pixel type.