Orfeo Toolbox  3.16
itkPadImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkPadImageFilter.h,v $
5  Language: C++
6  Date: $Date: 2009-07-12 10:52:52 $
7  Version: $Revision: 1.16 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkPadImageFilter_h
18 #define __itkPadImageFilter_h
19 
20 #include "itkImageToImageFilter.h"
21 #include "itkSize.h"
22 
23 namespace itk
24 {
25 
41 template <class TInputImage, class TOutputImage>
43  public ImageToImageFilter<TInputImage,TOutputImage>
44 {
45 public:
51 
53  itkNewMacro(Self);
54 
56  typedef typename TOutputImage::RegionType OutputImageRegionType;
57  typedef typename TInputImage::RegionType InputImageRegionType;
58 
60  typedef typename TOutputImage::PixelType OutputImagePixelType;
61  typedef typename TInputImage::PixelType InputImagePixelType;
62 
64  typedef typename TOutputImage::IndexType OutputImageIndexType;
65  typedef typename TInputImage::IndexType InputImageIndexType;
66  typedef typename TOutputImage::SizeType OutputImageSizeType;
67  typedef typename TInputImage::SizeType InputImageSizeType;
68  typedef typename TInputImage::SizeValueType SizeValueType;
69 
71  itkTypeMacro(PadImageFilter, ImageToImageFilter);
72 
74  itkStaticConstMacro(ImageDimension, unsigned int,
75  TInputImage::ImageDimension );
76 
79  itkSetVectorMacro(PadLowerBound, const SizeValueType, ImageDimension);
80  itkSetVectorMacro(PadUpperBound, const SizeValueType, ImageDimension);
81  itkGetVectorMacro(PadLowerBound, const SizeValueType, ImageDimension);
82  itkGetVectorMacro(PadUpperBound, const SizeValueType, ImageDimension);
83 
84 
85  void SetPadLowerBound(const InputImageSizeType & bound)
86  {
87  this->SetPadLowerBound( bound.m_Size );
88  }
89 
90  void SetPadUpperBound(const InputImageSizeType & bound)
91  {
92  this->SetPadUpperBound( bound.m_Size );
93  }
94 
95  void SetPadBound(const InputImageSizeType & bound)
96  {
97  this->SetPadLowerBound( bound );
98  this->SetPadUpperBound( bound );
99  }
100 
107  virtual void GenerateOutputInformation();
108 
114  virtual void GenerateInputRequestedRegion();
115 
116 protected:
117  PadImageFilter();
119  void PrintSelf(std::ostream& os, Indent indent) const;
120 
121 private:
122  PadImageFilter(const Self&); //purposely not implemented
123  void operator=(const Self&); //purposely not implemented
124 
125  SizeValueType m_PadLowerBound[ImageDimension];
126  SizeValueType m_PadUpperBound[ImageDimension];
127 };
128 
129 
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 #include "itkPadImageFilter.txx"
134 #endif
135 
136 #endif

Generated at Sat Feb 2 2013 23:58:07 for Orfeo Toolbox with doxygen 1.8.1.1