ITK  6.0.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:
39 {
40 SAME = 0,
41 VALID
42 };
43};
44
46extern ITKConvolution_EXPORT std::ostream &
48
56template <typename TInputImage, typename TKernelImage = TInputImage, typename TOutputImage = TInputImage>
57class ITK_TEMPLATE_EXPORT ConvolutionImageFilterBase : public ImageToImageFilter<TInputImage, TOutputImage>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(ConvolutionImageFilterBase);
61
66
68 itkOverrideGetNameOfClassMacro(ConvolutionImageFilterBase);
69
71 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
72
73 using InputImageType = TInputImage;
74 using OutputImageType = TOutputImage;
75 using KernelImageType = TKernelImage;
76 using InputPixelType = typename InputImageType::PixelType;
77 using OutputPixelType = typename OutputImageType::PixelType;
78 using KernelPixelType = typename KernelImageType::PixelType;
89
92#ifndef ITK_FUTURE_LEGACY_REMOVE
93 using BoundaryConditionPointerType [[deprecated("Please just use `BoundaryConditionType *` instead!")]] =
95#endif
97
99 itkSetMacro(BoundaryCondition, BoundaryConditionType *);
100 itkGetConstMacro(BoundaryCondition, BoundaryConditionType *);
110 itkSetMacro(Normalize, bool);
111 itkGetConstMacro(Normalize, bool);
112 itkBooleanMacro(Normalize);
117#if !defined(ITK_LEGACY_REMOVE)
119 // We need to expose the enum values at the class level
120 // for backwards compatibility
121 static constexpr OutputRegionModeEnum SAME = OutputRegionModeEnum::SAME;
122 static constexpr OutputRegionModeEnum VALID = OutputRegionModeEnum::VALID;
123#endif
124
134 itkSetEnumMacro(OutputRegionMode, OutputRegionModeEnum);
135 itkGetEnumMacro(OutputRegionMode, OutputRegionModeEnum);
136 virtual void
138 virtual void
142protected:
144 ~ConvolutionImageFilterBase() override = default;
145
146 void
147 PrintSelf(std::ostream & os, Indent indent) const override;
148
151 void
153
157
160 void
161 VerifyInputInformation() const override
162 {}
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
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....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
unsigned long SizeValueType
Definition: itkIntTypes.h:86