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: 2008-10-14 19:20:33 $
00007   Version:   $Revision: 1.12 $
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 <class TInputImage, class TOutputImage>
00072 class ITK_EXPORT ExpandImageFilter:
00073     public ImageToImageFilter<TInputImage,TOutputImage>
00074 {
00075 public:
00077   typedef ExpandImageFilter                             Self;
00078   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00079   typedef SmartPointer<Self>                            Pointer;
00080   typedef SmartPointer<const Self>                      ConstPointer;
00081 
00083   itkNewMacro(Self);  
00084 
00086   itkTypeMacro(ExpandImageFilter, ImageToImageFilter);
00087 
00089   typedef typename TOutputImage::RegionType OutputImageRegionType;
00090 
00092   itkStaticConstMacro(ImageDimension, unsigned int,
00093                       TInputImage::ImageDimension);
00094 
00096   typedef typename Superclass::InputImageType  InputImageType;
00097   typedef typename Superclass::OutputImageType OutputImageType;
00098   typedef typename OutputImageType::PixelType  OutputPixelType;
00099   typedef typename InputImageType::Pointer     InputImagePointer;
00100   typedef typename OutputImageType::Pointer    OutputImagePointer;
00101 
00103   typedef double                             CoordRepType;
00104   typedef InterpolateImageFunction<InputImageType,CoordRepType> 
00105                                              InterpolatorType;
00106   typedef typename InterpolatorType::Pointer InterpolatorPointer;
00107   typedef LinearInterpolateImageFunction<InputImageType,CoordRepType> 
00108                                              DefaultInterpolatorType;
00109 
00111   itkSetObjectMacro( Interpolator, InterpolatorType );
00112 
00114   itkGetObjectMacro( Interpolator, InterpolatorType );
00115 
00118   virtual void SetExpandFactors( const unsigned int factors[] );
00119   virtual void SetExpandFactors( const unsigned int factor );
00121 
00123   virtual const unsigned int * GetExpandFactors() const
00124   { return m_ExpandFactors; }
00125 
00127   itkSetMacro( EdgePaddingValue, OutputPixelType );
00128 
00130   itkGetMacro( EdgePaddingValue, OutputPixelType );
00131 
00138   virtual void GenerateOutputInformation();
00139 
00145   virtual void GenerateInputRequestedRegion();
00146 
00147 #ifdef ITK_USE_CONCEPT_CHECKING
00148 
00149   itkConceptMacro(InputHasNumericTraitsCheck,
00150     (Concept::HasNumericTraits<typename TInputImage::PixelType>));
00151   itkConceptMacro(OutputHasNumericTraitsCheck,
00152     (Concept::HasNumericTraits<OutputPixelType>));
00153 
00155 #endif
00156 
00157 protected:
00158   ExpandImageFilter();
00159   ~ExpandImageFilter() {}
00160   void PrintSelf(std::ostream& os, Indent indent) const;
00161 
00171   virtual
00172   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00173                             int threadId );
00174 
00177   virtual void BeforeThreadedGenerateData();
00178 
00179 private:
00180   ExpandImageFilter(const Self&); //purposely not implemented
00181   void operator=(const Self&); //purposely not implemented
00182 
00183   unsigned int           m_ExpandFactors[ImageDimension];
00184   InterpolatorPointer    m_Interpolator;
00185   OutputPixelType        m_EdgePaddingValue;
00186  
00187 };
00188 
00189 } // end namespace itk
00190 
00191 #ifndef ITK_MANUAL_INSTANTIATION
00192 #include "itkExpandImageFilter.txx"
00193 #endif
00194 
00195 #endif
00196 

Generated at Wed Nov 5 21:16:29 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000