ITK  5.1.0
Insight Toolkit
itkGrayscaleDilateImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 : public KernelImageFilter<TInputImage, TOutputImage, TKernel>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleDilateImageFilter);
57 
63 
65  itkNewMacro(Self);
66 
69 
71  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
72 
74  using InputImageType = TInputImage;
75  using OutputImageType = TOutputImage;
77  using SizeType = typename TInputImage::SizeType;
79  using PixelType = typename TInputImage::PixelType;
80  using OffsetType = typename TInputImage::OffsetType;
81  using OutputImageRegionType = typename Superclass::OutputImageRegionType;
82 
85 
87 
91 
96 
98  using KernelType = TKernel;
99  // using KernelSuperclass = typename KernelType::Superclass;
100  // using KernelSuperclass = Neighborhood< typename KernelType::PixelType, ImageDimension >;
101 
103  void
104  SetKernel(const KernelType & kernel) override;
105 
107  void
108  SetBoundary(const PixelType value);
109 
110  itkGetConstMacro(Boundary, PixelType);
111 
113  void
114  SetAlgorithm(int algo);
115 
116  itkGetConstMacro(Algorithm, int);
117 
119  void
120  Modified() const override;
121 
124  {
125  BASIC = 0,
126  HISTO = 1,
127  ANCHOR = 2,
128  VHGW = 3
129  };
130 
131  void
132  SetNumberOfWorkUnits(ThreadIdType nb) override;
133 
134 protected:
136  ~GrayscaleDilateImageFilter() override = default;
137  void
138  PrintSelf(std::ostream & os, Indent indent) const override;
139 
140  void
141  GenerateData() override;
142 
143 private:
145 
146  // the filters used internally
148 
150 
152 
154 
155  // and the name of the filter
157 
158  // the boundary condition need to be stored here
160 }; // end of class
161 } // end namespace itk
162 
163 #ifndef ITK_MANUAL_INSTANTIATION
164 # include "itkGrayscaleDilateImageFilter.hxx"
165 #endif
166 
167 #endif
itkVanHerkGilWermanDilateImageFilter.h
itk::GrayscaleDilateImageFilter::m_Boundary
PixelType m_Boundary
Definition: itkGrayscaleDilateImageFilter.h:144
itk::CastImageFilter
Casts input pixels to output pixel type.
Definition: itkCastImageFilter.h:104
itk::GrayscaleDilateImageFilter::AlgorithmType
AlgorithmType
Definition: itkGrayscaleDilateImageFilter.h:123
itk::GrayscaleDilateImageFilter::m_BoundaryCondition
DefaultBoundaryConditionType m_BoundaryCondition
Definition: itkGrayscaleDilateImageFilter.h:159
itkMovingHistogramDilateImageFilter.h
itk::BasicDilateImageFilter
gray scale dilation of an image
Definition: itkBasicDilateImageFilter.h:48
itk::FlatStructuringElement
A class to support a variety of flat structuring elements, including versions created by decompositio...
Definition: itkKernelImageFilter.h:27
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::GrayscaleDilateImageFilter::m_HistogramFilter
HistogramFilterType::Pointer m_HistogramFilter
Definition: itkGrayscaleDilateImageFilter.h:147
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkCastImageFilter.h
itk::AnchorDilateImageFilter
Definition: itkAnchorDilateImageFilter.h:27
itkNeighborhood.h
itk::BoxImageFilter::OffsetType
typename TInputImage::OffsetType OffsetType
Definition: itkBoxImageFilter.h:62
itkConstantBoundaryCondition.h
itk::GrayscaleDilateImageFilter::m_BasicFilter
BasicFilterType::Pointer m_BasicFilter
Definition: itkGrayscaleDilateImageFilter.h:149
itk::GrayscaleDilateImageFilter
Grayscale dilation of an image.
Definition: itkGrayscaleDilateImageFilter.h:53
itk::ImageBoundaryCondition< InputImageType >
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::ConstantBoundaryCondition< InputImageType >
itkKernelImageFilter.h
itk::BoxImageFilter::IndexType
typename TInputImage::IndexType IndexType
Definition: itkBoxImageFilter.h:61
itk::GrayscaleDilateImageFilter::PixelType
typename TInputImage::PixelType PixelType
Definition: itkGrayscaleDilateImageFilter.h:79
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itkAnchorDilateImageFilter.h
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::MovingHistogramDilateImageFilter
gray scale dilation of an image
Definition: itkMovingHistogramDilateImageFilter.h:43
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::KernelImageFilter::KernelType
TKernel KernelType
Definition: itkKernelImageFilter.h:71
itk::VanHerkGilWermanDilateImageFilter
Definition: itkVanHerkGilWermanDilateImageFilter.h:40
itk::GrayscaleDilateImageFilter::m_AnchorFilter
AnchorFilterType::Pointer m_AnchorFilter
Definition: itkGrayscaleDilateImageFilter.h:151
itk::BoxImageFilter::SizeType
typename TInputImage::SizeType SizeType
Definition: itkBoxImageFilter.h:60
itk::KernelImageFilter
A base class for all the filters working on an arbitrary shaped neighborhood.
Definition: itkKernelImageFilter.h:41
itk::GrayscaleDilateImageFilter::m_Algorithm
int m_Algorithm
Definition: itkGrayscaleDilateImageFilter.h:156
itk::GrayscaleDilateImageFilter::m_VHGWFilter
VHGWFilterType::Pointer m_VHGWFilter
Definition: itkGrayscaleDilateImageFilter.h:153
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::BoxImageFilter::RegionType
typename TInputImage::RegionType RegionType
Definition: itkBoxImageFilter.h:59
itkBasicDilateImageFilter.h