ITK  5.4.0
Insight Toolkit
itkConvolutionImageFilterBase.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 itkConvolutionImageFilterBase_h
19#define itkConvolutionImageFilterBase_h
20
23#include "ITKConvolutionExport.h"
24
25namespace itk
26{
32{
33public:
40 {
41 SAME = 0,
42 VALID
43 };
44};
45
47extern ITKConvolution_EXPORT std::ostream &
49
57template <typename TInputImage, typename TKernelImage = TInputImage, typename TOutputImage = TInputImage>
58class ITK_TEMPLATE_EXPORT ConvolutionImageFilterBase : public ImageToImageFilter<TInputImage, TOutputImage>
59{
60public:
61 ITK_DISALLOW_COPY_AND_MOVE(ConvolutionImageFilterBase);
62
67
69 itkOverrideGetNameOfClassMacro(ConvolutionImageFilterBase);
70
72 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
73
74 using InputImageType = TInputImage;
75 using OutputImageType = TOutputImage;
76 using KernelImageType = TKernelImage;
77 using InputPixelType = typename InputImageType::PixelType;
78 using OutputPixelType = typename OutputImageType::PixelType;
79 using KernelPixelType = typename KernelImageType::PixelType;
90
93#ifndef ITK_FUTURE_LEGACY_REMOVE
94 using BoundaryConditionPointerType [[deprecated("Please just use `BoundaryConditionType *` instead!")]] =
96#endif
98
100 itkSetMacro(BoundaryCondition, BoundaryConditionType *);
101 itkGetConstMacro(BoundaryCondition, BoundaryConditionType *);
111 itkSetMacro(Normalize, bool);
112 itkGetConstMacro(Normalize, bool);
113 itkBooleanMacro(Normalize);
118#if !defined(ITK_LEGACY_REMOVE)
120 // We need to expose the enum values at the class level
121 // for backwards compatibility
122 static constexpr OutputRegionModeEnum SAME = OutputRegionModeEnum::SAME;
123 static constexpr OutputRegionModeEnum VALID = OutputRegionModeEnum::VALID;
124#endif
125
135 itkSetEnumMacro(OutputRegionMode, OutputRegionModeEnum);
136 itkGetEnumMacro(OutputRegionMode, OutputRegionModeEnum);
137 virtual void
139 virtual void
143protected:
145 ~ConvolutionImageFilterBase() override = default;
146
147 void
148 PrintSelf(std::ostream & os, Indent indent) const override;
149
152 void
154
158
161 void
162 VerifyInputInformation() ITKv5_CONST override{};
163
164private:
165 bool m_Normalize{ false };
166
167 DefaultBoundaryConditionType m_DefaultBoundaryCondition{};
168 BoundaryConditionType * m_BoundaryCondition{};
169
171};
172} // end namespace itk
173
174#ifndef ITK_MANUAL_INSTANTIATION
175# include "itkConvolutionImageFilterBase.hxx"
176#endif
177
178#endif
Contains all enum classes used by ConvolutionImageFilterBase class.
Abstract base class for the convolution image filters.
typename KernelImageType::IndexType KernelIndexType
typename KernelImageType::PixelType KernelPixelType
typename KernelImageType::SizeType KernelSizeType
itkSetInputMacro(KernelImage, KernelImageType)
typename OutputImageType::PixelType OutputPixelType
typename OutputImageType::RegionType OutputRegionType
typename OutputImageType::IndexType OutputIndexType
virtual void SetOutputRegionModeToValid()
typename KernelImageType::RegionType KernelRegionType
typename InputSizeType::SizeValueType SizeValueType
virtual void SetOutputRegionModeToSame()
OutputRegionType GetValidRegion() const
typename InputImageType::PixelType InputPixelType
typename OutputImageType::SizeType OutputSizeType
typename InputImageType::IndexType InputIndexType
void VerifyInputInformation() ITKv5_CONST override
typename InputImageType::RegionType InputRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
itkGetInputMacro(KernelImage, KernelImageType)
typename InputImageType::SizeType InputSizeType
~ConvolutionImageFilterBase() override=default
void GenerateOutputInformation() override
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
A function object that determines a neighborhood of values at an image boundary according to a Neuman...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:216
unsigned long SizeValueType
Definition: itkIntTypes.h:83