ITK  4.13.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:
43 
46 
48  itkStaticConstMacro(ImageDimension, unsigned int,
49  TInputImage::ImageDimension);
50 
51  typedef TInputImage InputImageType;
52  typedef TOutputImage OutputImageType;
53  typedef TKernelImage KernelImageType;
54  typedef typename InputImageType::PixelType InputPixelType;
55  typedef typename OutputImageType::PixelType OutputPixelType;
56  typedef typename KernelImageType::PixelType KernelPixelType;
64  typedef typename InputImageType::RegionType InputRegionType;
65  typedef typename OutputImageType::RegionType OutputRegionType;
66  typedef typename KernelImageType::RegionType KernelRegionType;
67 
72 
74  itkSetMacro(BoundaryCondition, BoundaryConditionPointerType);
75  itkGetConstMacro(BoundaryCondition, BoundaryConditionPointerType);
77 
79  itkSetInputMacro(KernelImage, KernelImageType);
80  itkGetInputMacro(KernelImage, KernelImageType);
82 
85  itkSetMacro(Normalize, bool);
86  itkGetConstMacro(Normalize, bool);
87  itkBooleanMacro(Normalize);
89 
90  typedef enum
91  {
92  SAME = 0,
93  VALID
94  } OutputRegionModeType;
95 
105  itkSetEnumMacro(OutputRegionMode, OutputRegionModeType);
106  itkGetEnumMacro(OutputRegionMode, OutputRegionModeType);
107  virtual void SetOutputRegionModeToSame();
108  virtual void SetOutputRegionModeToValid();
110 
111 protected:
113  ~ConvolutionImageFilterBase() ITK_OVERRIDE {}
114 
115  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
116 
119  void GenerateOutputInformation() ITK_OVERRIDE;
120 
122  OutputRegionType GetValidRegion() const;
123 
126  virtual void VerifyInputInformation() ITK_OVERRIDE {};
127 
128 private:
129  ITK_DISALLOW_COPY_AND_ASSIGN(ConvolutionImageFilterBase);
130 
131  bool m_Normalize;
132 
135 
137 };
138 } // end namespace itk
139 
140 #ifndef ITK_MANUAL_INSTANTIATION
141 #include "itkConvolutionImageFilterBase.hxx"
142 #endif
143 
144 #endif
KernelImageType::RegionType KernelRegionType
BoundaryConditionPointerType m_BoundaryCondition
Abstract base class for the convolution image filters.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
BoundaryConditionType * BoundaryConditionPointerType
OutputImageType::RegionType OutputRegionType
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
DefaultBoundaryConditionType m_DefaultBoundaryCondition
ZeroFluxNeumannBoundaryCondition< TInputImage > DefaultBoundaryConditionType
Base class for filters that take an image as input and produce an image as output.
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageBoundaryCondition< TInputImage > BoundaryConditionType
InputSizeType::SizeValueType SizeValueType