ITK  5.2.0
Insight Toolkit
itkConvolutionImageFilter.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 itkConvolutionImageFilter_h
19 #define itkConvolutionImageFilter_h
20 
22 
23 #include "itkProgressAccumulator.h"
25 
26 namespace itk
27 {
64 template <typename TInputImage, typename TKernelImage = TInputImage, typename TOutputImage = TInputImage>
65 class ITK_TEMPLATE_EXPORT ConvolutionImageFilter
66  : public ConvolutionImageFilterBase<TInputImage, TKernelImage, TOutputImage>
67 {
68 public:
69  ITK_DISALLOW_COPY_AND_MOVE(ConvolutionImageFilter);
70 
75 
77  itkNewMacro(Self);
78 
81 
83  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
84 
85  using InputImageType = TInputImage;
86  using OutputImageType = TOutputImage;
87  using KernelImageType = TKernelImage;
88  using InputPixelType = typename InputImageType::PixelType;
89  using OutputPixelType = typename OutputImageType::PixelType;
90  using KernelPixelType = typename KernelImageType::PixelType;
100 
101 protected:
102  ConvolutionImageFilter() = default;
103  ~ConvolutionImageFilter() override = default;
104 
112  void
113  GenerateInputRequestedRegion() override;
114 
116  void
117  GenerateData() override;
118 
121  bool
122  GetKernelNeedsPadding() const;
123 
126  GetKernelPadSize() const;
127 
129  template <typename TImage>
131  GetKernelRadius(const TImage * kernelImage) const;
132 
133 private:
134  template <typename TImage>
135  void
136  ComputeConvolution(const TImage * kernelImage, ProgressAccumulator * progress);
137 };
138 } // namespace itk
139 
140 #ifndef ITK_MANUAL_INSTANTIATION
141 # include "itkConvolutionImageFilter.hxx"
142 #endif
143 
144 #endif
itkConvolutionImageFilterBase.h
itk::ConvolutionImageFilter::OutputRegionType
typename OutputImageType::RegionType OutputRegionType
Definition: itkConvolutionImageFilter.h:98
itk::GTest::TypedefsAndConstructors::Dimension2::SizeType
ImageBaseType::SizeType SizeType
Definition: itkGTestTypedefsAndConstructors.h:49
itk::SmartPointer< Self >
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::ConvolutionImageFilter::InputSizeType
typename InputImageType::SizeType InputSizeType
Definition: itkConvolutionImageFilter.h:94
itk::ConvolutionImageFilter::OutputPixelType
typename OutputImageType::PixelType OutputPixelType
Definition: itkConvolutionImageFilter.h:89
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ConvolutionImageFilter::KernelSizeType
typename KernelImageType::SizeType KernelSizeType
Definition: itkConvolutionImageFilter.h:96
itk::ConvolutionImageFilter::InputIndexType
typename InputImageType::IndexType InputIndexType
Definition: itkConvolutionImageFilter.h:91
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ConvolutionImageFilter
Convolve a given image with an arbitrary image kernel.
Definition: itkConvolutionImageFilter.h:65
itk::ConvolutionImageFilter::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkConvolutionImageFilter.h:88
itk::ProgressAccumulator
Facilitates progress reporting for filters that wrap around multiple other filters.
Definition: itkProgressAccumulator.h:40
itk::ConvolutionImageFilter::KernelRegionType
typename KernelImageType::RegionType KernelRegionType
Definition: itkConvolutionImageFilter.h:99
itk::ConvolutionImageFilter::KernelPixelType
typename KernelImageType::PixelType KernelPixelType
Definition: itkConvolutionImageFilter.h:90
itk::ConvolutionImageFilter::KernelIndexType
typename KernelImageType::IndexType KernelIndexType
Definition: itkConvolutionImageFilter.h:93
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ConvolutionImageFilter::OutputSizeType
typename OutputImageType::SizeType OutputSizeType
Definition: itkConvolutionImageFilter.h:95
itkProgressAccumulator.h
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::ConvolutionImageFilter::KernelImageType
TKernelImage KernelImageType
Definition: itkConvolutionImageFilter.h:87
itk::ConvolutionImageFilter::OutputIndexType
typename OutputImageType::IndexType OutputIndexType
Definition: itkConvolutionImageFilter.h:92
itk::ConvolutionImageFilter::InputRegionType
typename InputImageType::RegionType InputRegionType
Definition: itkConvolutionImageFilter.h:97
itkZeroFluxNeumannBoundaryCondition.h
itk::ConvolutionImageFilterBase
Abstract base class for the convolution image filters.
Definition: itkConvolutionImageFilterBase.h:58
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90