ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkConvolutionImageFilterBase.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 itkConvolutionImageFilterBase_h
19 #define itkConvolutionImageFilterBase_h
20 
21 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
32 template< typename TInputImage,
33  typename TKernelImage = TInputImage,
34  typename TOutputImage = TInputImage >
35 class ITK_TEMPLATE_EXPORT ConvolutionImageFilterBase :
36  public ImageToImageFilter< TInputImage, TOutputImage >
37 {
38 public:
39  ITK_DISALLOW_COPY_AND_ASSIGN(ConvolutionImageFilterBase);
40 
45 
48 
50  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
51 
52  using InputImageType = TInputImage;
53  using OutputImageType = TOutputImage;
54  using KernelImageType = TKernelImage;
55  using InputPixelType = typename InputImageType::PixelType;
56  using OutputPixelType = typename OutputImageType::PixelType;
57  using KernelPixelType = typename KernelImageType::PixelType;
68 
73 
75  itkSetMacro(BoundaryCondition, BoundaryConditionPointerType);
76  itkGetConstMacro(BoundaryCondition, BoundaryConditionPointerType);
78 
80  itkSetInputMacro(KernelImage, KernelImageType);
81  itkGetInputMacro(KernelImage, KernelImageType);
83 
86  itkSetMacro(Normalize, bool);
87  itkGetConstMacro(Normalize, bool);
88  itkBooleanMacro(Normalize);
90 
91  typedef enum
92  {
93  SAME = 0,
94  VALID
95  } OutputRegionModeType;
96 
106  itkSetEnumMacro(OutputRegionMode, OutputRegionModeType);
107  itkGetEnumMacro(OutputRegionMode, OutputRegionModeType);
108  virtual void SetOutputRegionModeToSame();
109  virtual void SetOutputRegionModeToValid();
111 
112 protected:
114  ~ConvolutionImageFilterBase() override = default;
115 
116  void PrintSelf(std::ostream & os, Indent indent) const override;
117 
120  void GenerateOutputInformation() override;
121 
123  OutputRegionType GetValidRegion() const;
124 
127  void VerifyInputInformation() ITKv5_CONST override {};
128 
129 private:
130  bool m_Normalize{ false };
131 
134 
136 };
137 } // end namespace itk
138 
139 #ifndef ITK_MANUAL_INSTANTIATION
140 #include "itkConvolutionImageFilterBase.hxx"
141 #endif
142 
143 #endif
unsigned long SizeValueType
Definition: itkIntTypes.h:83
BoundaryConditionPointerType m_BoundaryCondition
Abstract base class for the convolution image filters.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
void VerifyInputInformation() ITKv5_CONST override
Base class for all process objects that output image data.
TOutputImage OutputImageType
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
DefaultBoundaryConditionType m_DefaultBoundaryCondition
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49