ITK  6.0.0
Insight Toolkit
itkBinaryDilateImageFilter.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 * https://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 itkBinaryDilateImageFilter_h
19#define itkBinaryDilateImageFilter_h
20
21#include <vector>
22#include <queue>
25
26namespace itk
27{
69template <typename TInputImage, typename TOutputImage, typename TKernel>
70class ITK_TEMPLATE_EXPORT BinaryDilateImageFilter
71 : public BinaryMorphologyImageFilter<TInputImage, TOutputImage, TKernel>
72{
73public:
74 ITK_DISALLOW_COPY_AND_MOVE(BinaryDilateImageFilter);
75
77 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
78 static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
79
81 static constexpr unsigned int KernelDimension = TKernel::NeighborhoodDimension;
82
84 using InputImageType = TInputImage;
85 using OutputImageType = TOutputImage;
86 using KernelType = TKernel;
87
91
94
96 itkNewMacro(Self);
97
99 itkOverrideGetNameOfClassMacro(BinaryDilateImageFilter);
100
102 using KernelIteratorType = typename KernelType::ConstIterator;
103
105 using InputPixelType = typename InputImageType::PixelType;
106 using OutputPixelType = typename OutputImageType::PixelType;
108 using OffsetType = typename InputImageType::OffsetType;
110
114
118 void
120 {
121 this->SetForegroundValue(value);
122 }
123
127 InputPixelType
129 {
130 return this->GetForegroundValue();
131 }
132
133protected:
135 ~BinaryDilateImageFilter() override = default;
136 void
137 PrintSelf(std::ostream & os, Indent indent) const override;
138
139 void
140 GenerateData() override;
141
142 // type inherited from the superclass
143 using typename Superclass::NeighborIndexContainer;
144};
145} // end namespace itk
146
147#ifndef ITK_MANUAL_INSTANTIATION
148# include "itkBinaryDilateImageFilter.hxx"
149#endif
150
151#endif
Fast binary dilation of a single intensity value in the image.
void SetDilateValue(const InputPixelType &value)
void PrintSelf(std::ostream &os, Indent indent) const override
typename KernelType::ConstIterator KernelIteratorType
void GenerateData() override
typename InputImageType::SizeType InputSizeType
typename NumericTraits< InputPixelType >::RealType InputRealType
~BinaryDilateImageFilter() override=default
Base class for fast binary dilation and erosion.
typename TInputImage::PixelType InputPixelType
typename TInputImage::IndexType IndexType
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::OffsetType OffsetType
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
typename InputImageType::RegionType InputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Define additional traits for native types such as int or float.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....