ITK  4.3.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< class TInputImage,
33  class TKernelImage = TInputImage,
34  class TOutputImage = TInputImage >
35 class ITK_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;
57  typedef typename InputImageType::IndexType InputIndexType;
58  typedef typename OutputImageType::IndexType OutputIndexType;
59  typedef typename KernelImageType::IndexType KernelIndexType;
60  typedef typename InputImageType::SizeType InputSizeType;
61  typedef typename OutputImageType::SizeType OutputSizeType;
62  typedef typename KernelImageType::SizeType KernelSizeType;
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:
114 
115  void PrintSelf(std::ostream & os, Indent indent) const;
116 
119  void GenerateOutputInformation();
120 
122  OutputRegionType GetValidRegion() const;
123 
126  virtual void VerifyInputInformation() {};
127 
128 private:
129  ConvolutionImageFilterBase(const Self &); //purposely not implemented
130  void operator=(const Self &); //purposely not implemented
131 
133 
136 
137  OutputRegionModeType m_OutputRegionMode;
138 };
139 } // end namespace itk
140 
141 #ifndef ITK_MANUAL_INSTANTIATION
142 #include "itkConvolutionImageFilterBase.hxx"
143 #endif
144 
145 #endif
146