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

itkExpandImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkExpandImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/30 15:24:40 $
00007   Version:   $Revision: 1.8 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkExpandImageFilter_h
00018 #define __itkExpandImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkInterpolateImageFunction.h"
00022 #include "itkLinearInterpolateImageFunction.h"
00023 
00024 namespace itk
00025 {
00026 
00071 template <
00072 class TInputImage, 
00073 class TOutputImage 
00074 >
00075 class ITK_EXPORT ExpandImageFilter:
00076   public ImageToImageFilter<TInputImage,TOutputImage>
00077 {
00078 public:
00080   typedef ExpandImageFilter         Self;
00081   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00082   typedef SmartPointer<Self>  Pointer;
00083   typedef SmartPointer<const Self>  ConstPointer;
00084 
00086   itkNewMacro(Self);  
00087 
00089   itkTypeMacro(ExpandImageFilter, ImageToImageFilter);
00090 
00092   typedef typename TOutputImage::RegionType OutputImageRegionType;
00093 
00095   itkStaticConstMacro(ImageDimension, unsigned int,
00096                       TInputImage::ImageDimension);
00097 
00099   typedef typename Superclass::InputImageType  InputImageType;
00100   typedef typename Superclass::OutputImageType OutputImageType;
00101   typedef typename OutputImageType::PixelType  OutputPixelType;
00102   typedef typename InputImageType::Pointer  InputImagePointer;
00103   typedef typename OutputImageType::Pointer  OutputImagePointer;
00104 
00106   typedef double CoordRepType;
00107   typedef InterpolateImageFunction<InputImageType,CoordRepType> 
00108     InterpolatorType;
00109   typedef typename InterpolatorType::Pointer InterpolatorPointer;
00110   typedef LinearInterpolateImageFunction<InputImageType,CoordRepType> 
00111     DefaultInterpolatorType;
00112 
00114   itkSetObjectMacro( Interpolator, InterpolatorType );
00115 
00117   itkGetObjectMacro( Interpolator, InterpolatorType );
00118 
00121   virtual void SetExpandFactors( const unsigned int factors[] );
00122   virtual void SetExpandFactors( const unsigned int factor );
00123 
00125   virtual const unsigned int * GetExpandFactors() const
00126     { return m_ExpandFactors; }
00127 
00129   itkSetMacro( EdgePaddingValue, OutputPixelType );
00130 
00132   itkGetMacro( EdgePaddingValue, OutputPixelType );
00133 
00140   virtual void GenerateOutputInformation();
00141 
00147   virtual void GenerateInputRequestedRegion();
00148 
00149 protected:
00150   ExpandImageFilter();
00151   ~ExpandImageFilter() {}
00152   void PrintSelf(std::ostream& os, Indent indent) const;
00153 
00163   virtual
00164   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00165                             int threadId );
00166   
00169   virtual void BeforeThreadedGenerateData();
00170 
00171 private:
00172   ExpandImageFilter(const Self&); //purposely not implemented
00173   void operator=(const Self&); //purposely not implemented
00174 
00175   unsigned int           m_ExpandFactors[ImageDimension];
00176   InterpolatorPointer    m_Interpolator;
00177   OutputPixelType        m_EdgePaddingValue;
00178  
00179 };
00180 
00181 } // end namespace itk
00182 
00183 #ifndef ITK_MANUAL_INSTANTIATION
00184 #include "itkExpandImageFilter.txx"
00185 #endif
00186 
00187 #endif

Generated at Wed Mar 12 01:12:53 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000