ITK  5.1.0
Insight Toolkit
itkBinaryDilateImageFilter.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 itkBinaryDilateImageFilter_h
19 #define itkBinaryDilateImageFilter_h
20 
21 #include <vector>
22 #include <queue>
25 
26 namespace itk
27 {
69 template <typename TInputImage, typename TOutputImage, typename TKernel>
70 class ITK_TEMPLATE_EXPORT BinaryDilateImageFilter
71  : public BinaryMorphologyImageFilter<TInputImage, TOutputImage, TKernel>
72 {
73 public:
74  ITK_DISALLOW_COPY_AND_ASSIGN(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 
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 
133 protected:
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 NeighborIndexContainer = typename Superclass::NeighborIndexContainer;
144 };
145 } // end namespace itk
146 
147 #ifndef ITK_MANUAL_INSTANTIATION
148 # include "itkBinaryDilateImageFilter.hxx"
149 #endif
150 
151 #endif
itk::BinaryDilateImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkBinaryDilateImageFilter.h:113
itkConstNeighborhoodIterator.h
itk::BoxImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkBoxImageFilter.h:67
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BoxImageFilter::OffsetType
typename TInputImage::OffsetType OffsetType
Definition: itkBoxImageFilter.h:62
itk::BinaryDilateImageFilter
Fast binary dilation of a single intensity value in the image.
Definition: itkBinaryDilateImageFilter.h:70
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::BoxImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkBoxImageFilter.h:64
itk::BoxImageFilter::IndexType
typename TInputImage::IndexType IndexType
Definition: itkBoxImageFilter.h:61
itk::BinaryDilateImageFilter::SetDilateValue
void SetDilateValue(const InputPixelType &value)
Definition: itkBinaryDilateImageFilter.h:119
itk::BinaryDilateImageFilter::NeighborIndexContainer
typename Superclass::NeighborIndexContainer NeighborIndexContainer
Definition: itkBinaryDilateImageFilter.h:143
itk::BinaryDilateImageFilter::KernelIteratorType
typename KernelType::ConstIterator KernelIteratorType
Definition: itkBinaryDilateImageFilter.h:102
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::BinaryDilateImageFilter::GetDilateValue
InputPixelType GetDilateValue() const
Definition: itkBinaryDilateImageFilter.h:128
itk::NumericTraits
Define additional traits for native types such as int or float.
Definition: itkNumericTraits.h:58
itkBinaryMorphologyImageFilter.h
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::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:135
itk::KernelImageFilter::KernelType
TKernel KernelType
Definition: itkKernelImageFilter.h:71
itk::BinaryDilateImageFilter::InputRealType
typename NumericTraits< InputPixelType >::RealType InputRealType
Definition: itkBinaryDilateImageFilter.h:107
itk::ImageToImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkImageToImageFilter.h:132
itk::BinaryMorphologyImageFilter
Base class for fast binary dilation and erosion.
Definition: itkBinaryMorphologyImageFilter.h:103
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90