ITK  5.1.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 {
65 template <typename TInputImage, typename TKernelImage = TInputImage, typename TOutputImage = TInputImage>
66 class ITK_TEMPLATE_EXPORT ConvolutionImageFilter
67  : public ConvolutionImageFilterBase<TInputImage, TKernelImage, TOutputImage>
68 {
69 public:
70  ITK_DISALLOW_COPY_AND_ASSIGN(ConvolutionImageFilter);
71 
76 
78  itkNewMacro(Self);
79 
82 
84  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
85 
86  using InputImageType = TInputImage;
87  using OutputImageType = TOutputImage;
88  using KernelImageType = TKernelImage;
89  using InputPixelType = typename InputImageType::PixelType;
90  using OutputPixelType = typename OutputImageType::PixelType;
91  using KernelPixelType = typename KernelImageType::PixelType;
101 
102 protected:
103  ConvolutionImageFilter() = default;
104  ~ConvolutionImageFilter() override = default;
105 
113  void
114  GenerateInputRequestedRegion() override;
115 
117  void
118  GenerateData() override;
119 
122  bool
123  GetKernelNeedsPadding() const;
124 
127  GetKernelPadSize() const;
128 
130  template <typename TImage>
132  GetKernelRadius(const TImage * kernelImage) const;
133 
134 private:
135  template <typename TImage>
136  void
137  ComputeConvolution(const TImage * kernelImage, ProgressAccumulator * progress);
138 };
139 } // namespace itk
140 
141 #ifndef ITK_MANUAL_INSTANTIATION
142 # include "itkConvolutionImageFilter.hxx"
143 #endif
144 
145 #endif
itkConvolutionImageFilterBase.h
itk::ConvolutionImageFilter::OutputRegionType
typename OutputImageType::RegionType OutputRegionType
Definition: itkConvolutionImageFilter.h:99
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:95
itk::ConvolutionImageFilter::OutputPixelType
typename OutputImageType::PixelType OutputPixelType
Definition: itkConvolutionImageFilter.h:90
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ConvolutionImageFilter::KernelSizeType
typename KernelImageType::SizeType KernelSizeType
Definition: itkConvolutionImageFilter.h:97
itk::ConvolutionImageFilter::InputIndexType
typename InputImageType::IndexType InputIndexType
Definition: itkConvolutionImageFilter.h:92
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ConvolutionImageFilter
Convolve a given image with an arbitrary image kernel.
Definition: itkConvolutionImageFilter.h:66
itk::ConvolutionImageFilter::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkConvolutionImageFilter.h:89
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:100
itk::ConvolutionImageFilter::KernelPixelType
typename KernelImageType::PixelType KernelPixelType
Definition: itkConvolutionImageFilter.h:91
itk::ConvolutionImageFilter::KernelIndexType
typename KernelImageType::IndexType KernelIndexType
Definition: itkConvolutionImageFilter.h:94
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::ConvolutionImageFilter::OutputSizeType
typename OutputImageType::SizeType OutputSizeType
Definition: itkConvolutionImageFilter.h:96
itkProgressAccumulator.h
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:135
itk::ConvolutionImageFilter::KernelImageType
TKernelImage KernelImageType
Definition: itkConvolutionImageFilter.h:88
itk::ConvolutionImageFilter::OutputIndexType
typename OutputImageType::IndexType OutputIndexType
Definition: itkConvolutionImageFilter.h:93
itk::ConvolutionImageFilter::InputRegionType
typename InputImageType::RegionType InputRegionType
Definition: itkConvolutionImageFilter.h:98
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