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: 2009-07-12 10:52:52 $
00007   Version:   $Revision: 1.16 $
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   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&); //purposely not implemented
00124   void operator=(const Self&); //purposely not implemented
00125 
00126   SizeValueType    m_PadLowerBound[ImageDimension];
00127   SizeValueType    m_PadUpperBound[ImageDimension];
00128 };
00129 
00130   
00131 } // end namespace itk
00132   
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "itkPadImageFilter.txx"
00135 #endif
00136   
00137 #endif
00138 

Generated at Tue Sep 15 04:17:13 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000