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: 2006/03/27 17:01:09 $
00007   Version:   $Revision: 1.11 $
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 __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 );
00124 
00126   virtual const unsigned int * GetExpandFactors() const
00127   { return m_ExpandFactors; }
00128 
00130   itkSetMacro( EdgePaddingValue, OutputPixelType );
00131 
00133   itkGetMacro( EdgePaddingValue, OutputPixelType );
00134 
00141   virtual void GenerateOutputInformation();
00142 
00148   virtual void GenerateInputRequestedRegion();
00149 
00150 #ifdef ITK_USE_CONCEPT_CHECKING
00151 
00152   itkConceptMacro(InputHasNumericTraitsCheck,
00153     (Concept::HasNumericTraits<typename TInputImage::PixelType>));
00154   itkConceptMacro(OutputHasNumericTraitsCheck,
00155     (Concept::HasNumericTraits<OutputPixelType>));
00156 
00158 #endif
00159 
00160 protected:
00161   ExpandImageFilter();
00162   ~ExpandImageFilter() {}
00163   void PrintSelf(std::ostream& os, Indent indent) const;
00164 
00174   virtual
00175   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00176                             int threadId );
00177 
00180   virtual void BeforeThreadedGenerateData();
00181 
00182 private:
00183   ExpandImageFilter(const Self&); //purposely not implemented
00184   void operator=(const Self&); //purposely not implemented
00185 
00186   unsigned int           m_ExpandFactors[ImageDimension];
00187   InterpolatorPointer    m_Interpolator;
00188   OutputPixelType        m_EdgePaddingValue;
00189  
00190 };
00191 
00192 } // end namespace itk
00193 
00194 #ifndef ITK_MANUAL_INSTANTIATION
00195 #include "itkExpandImageFilter.txx"
00196 #endif
00197 
00198 #endif
00199 

Generated at Mon Mar 12 00:10:14 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000