ITK  6.0.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 * 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 itkConvolutionImageFilter_h
19#define itkConvolutionImageFilter_h
20
22
25
26namespace itk
27{
64template <typename TInputImage, typename TKernelImage = TInputImage, typename TOutputImage = TInputImage>
65class ITK_TEMPLATE_EXPORT ConvolutionImageFilter
66 : public ConvolutionImageFilterBase<TInputImage, TKernelImage, TOutputImage>
67{
68public:
69 ITK_DISALLOW_COPY_AND_MOVE(ConvolutionImageFilter);
70
75
77 itkNewMacro(Self);
78
80 itkOverrideGetNameOfClassMacro(ConvolutionImageFilter);
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
101protected:
103 ~ConvolutionImageFilter() override = default;
104
112 void
114
116 void
117 GenerateData() override;
118
121 bool
123
127
129 template <typename TImage>
131 GetKernelRadius(const TImage * kernelImage) const;
132
133private:
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
Abstract base class for the convolution image filters.
Convolve a given image with an arbitrary image kernel.
bool GetKernelNeedsPadding() const
typename OutputImageType::IndexType OutputIndexType
typename InputImageType::RegionType InputRegionType
typename KernelImageType::PixelType KernelPixelType
typename InputImageType::SizeType InputSizeType
typename OutputImageType::RegionType OutputRegionType
typename KernelImageType::RegionType KernelRegionType
typename InputImageType::PixelType InputPixelType
void GenerateInputRequestedRegion() override
void ComputeConvolution(const TImage *kernelImage, ProgressAccumulator *progress)
typename InputImageType::IndexType InputIndexType
typename OutputImageType::PixelType OutputPixelType
~ConvolutionImageFilter() override=default
void GenerateData() override
KernelSizeType GetKernelRadius(const TImage *kernelImage) const
KernelSizeType GetKernelPadSize() const
typename OutputImageType::SizeType OutputSizeType
typename KernelImageType::IndexType KernelIndexType
typename KernelImageType::SizeType KernelSizeType
Light weight base class for most itk classes.
Facilitates progress reporting for filters that wrap around multiple other filters.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....