Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkPadImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPadImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-17 16:30:46 $
00007   Version:   $Revision: 1.15 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 
00070   itkTypeMacro(PadImageFilter, ImageToImageFilter);
00071 
00073   itkStaticConstMacro(ImageDimension, unsigned int,
00074                       TInputImage::ImageDimension );
00075 
00078   itkSetVectorMacro(PadLowerBound, const unsigned long, ImageDimension);
00079   itkSetVectorMacro(PadUpperBound, const unsigned long, ImageDimension);
00080   itkGetVectorMacro(PadLowerBound, const unsigned long, ImageDimension);
00081   itkGetVectorMacro(PadUpperBound, const unsigned long, ImageDimension);
00083 
00084   
00085   void SetPadLowerBound(const InputImageSizeType & bound)
00086     {
00087     this->SetPadLowerBound( bound.m_Size );
00088     }
00089     
00090   void SetPadUpperBound(const InputImageSizeType & bound)
00091     {
00092     this->SetPadUpperBound( bound.m_Size );
00093     }
00094     
00095   void SetPadBound(const InputImageSizeType & bound)
00096     {
00097     this->SetPadLowerBound( bound );
00098     this->SetPadUpperBound( bound );
00099     }
00100 
00107   virtual void GenerateOutputInformation();
00108 
00114   virtual void GenerateInputRequestedRegion();
00115 
00116 protected:
00117   PadImageFilter();
00118   ~PadImageFilter() {};
00119   void PrintSelf(std::ostream& os, Indent indent) const;
00120 
00121 private:
00122   PadImageFilter(const Self&); //purposely not implemented
00123   void operator=(const Self&); //purposely not implemented
00124 
00125   unsigned long m_PadLowerBound[ImageDimension];
00126   unsigned long m_PadUpperBound[ImageDimension];
00127 };
00128 
00129   
00130 } // end namespace itk
00131   
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkPadImageFilter.txx"
00134 #endif
00135   
00136 #endif
00137 

Generated at Thu May 28 11:05:32 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000