itkPadImageFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkPadImageFilter_h
00018 #define __itkPadImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkSize.h"
00022
00023 namespace itk
00024 {
00025
00041 template <class TInputImage, class TOutputImage>
00042 class ITK_EXPORT PadImageFilter:
00043 public ImageToImageFilter<TInputImage,TOutputImage>
00044 {
00045 public:
00047 typedef PadImageFilter Self;
00048 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00049 typedef SmartPointer<Self> Pointer;
00050 typedef SmartPointer<const Self> ConstPointer;
00051
00053 itkNewMacro(Self);
00054
00056 typedef typename TOutputImage::RegionType OutputImageRegionType;
00057 typedef typename TInputImage::RegionType InputImageRegionType;
00058
00060 typedef typename TOutputImage::PixelType OutputImagePixelType;
00061 typedef typename TInputImage::PixelType InputImagePixelType;
00062
00064 typedef typename TOutputImage::IndexType OutputImageIndexType;
00065 typedef typename TInputImage::IndexType InputImageIndexType;
00066 typedef typename TOutputImage::SizeType OutputImageSizeType;
00067 typedef typename TInputImage::SizeType InputImageSizeType;
00068 typedef typename TInputImage::SizeValueType SizeValueType;
00069
00071 itkTypeMacro(PadImageFilter, ImageToImageFilter);
00072
00074 itkStaticConstMacro(ImageDimension, unsigned int,
00075 TInputImage::ImageDimension );
00076
00079 itkSetVectorMacro(PadLowerBound, const SizeValueType, ImageDimension);
00080 itkSetVectorMacro(PadUpperBound, const SizeValueType, ImageDimension);
00081 itkGetVectorMacro(PadLowerBound, const SizeValueType, ImageDimension);
00082 itkGetVectorMacro(PadUpperBound, const SizeValueType, ImageDimension);
00084
00085
00086 void SetPadLowerBound(const InputImageSizeType & bound)
00087 {
00088 this->SetPadLowerBound( bound.m_Size );
00089 }
00090
00091 void SetPadUpperBound(const InputImageSizeType & bound)
00092 {
00093 this->SetPadUpperBound( bound.m_Size );
00094 }
00095
00096 void SetPadBound(const InputImageSizeType & bound)
00097 {
00098 this->SetPadLowerBound( bound );
00099 this->SetPadUpperBound( bound );
00100 }
00101
00108 virtual void GenerateOutputInformation();
00109
00115 virtual void GenerateInputRequestedRegion();
00116
00117 protected:
00118 PadImageFilter();
00119 ~PadImageFilter() {};
00120 void PrintSelf(std::ostream& os, Indent indent) const;
00121
00122 private:
00123 PadImageFilter(const Self&);
00124 void operator=(const Self&);
00125
00126 SizeValueType m_PadLowerBound[ImageDimension];
00127 SizeValueType m_PadUpperBound[ImageDimension];
00128 };
00129
00130
00131 }
00132
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "itkPadImageFilter.txx"
00135 #endif
00136
00137 #endif
00138