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: 2009-05-19 18:31:17 $
00007   Version:   $Revision: 1.14 $
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 
00078 template <class TInputImage, class TOutputImage>
00079 class ITK_EXPORT ExpandImageFilter:
00080     public ImageToImageFilter<TInputImage,TOutputImage>
00081 {
00082 public:
00084   typedef ExpandImageFilter                             Self;
00085   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00086   typedef SmartPointer<Self>                            Pointer;
00087   typedef SmartPointer<const Self>                      ConstPointer;
00088 
00090   itkNewMacro(Self);  
00091 
00093   itkTypeMacro(ExpandImageFilter, ImageToImageFilter);
00094 
00096   typedef typename TOutputImage::RegionType OutputImageRegionType;
00097 
00099   itkStaticConstMacro(ImageDimension, unsigned int,
00100                       TInputImage::ImageDimension);
00101 
00103   typedef typename Superclass::InputImageType  InputImageType;
00104   typedef typename Superclass::OutputImageType OutputImageType;
00105   typedef typename OutputImageType::PixelType  OutputPixelType;
00106   typedef typename InputImageType::Pointer     InputImagePointer;
00107   typedef typename OutputImageType::Pointer    OutputImagePointer;
00108 
00110   typedef double                             CoordRepType;
00111   typedef InterpolateImageFunction<InputImageType,CoordRepType> 
00112                                              InterpolatorType;
00113   typedef typename InterpolatorType::Pointer InterpolatorPointer;
00114   typedef LinearInterpolateImageFunction<InputImageType,CoordRepType> 
00115                                              DefaultInterpolatorType;
00116 
00118   itkSetObjectMacro( Interpolator, InterpolatorType );
00119 
00121   itkGetObjectMacro( Interpolator, InterpolatorType );
00122 
00125   virtual void SetExpandFactors( const unsigned int factors[] );
00126   virtual void SetExpandFactors( const unsigned int factor );
00128 
00130   virtual const unsigned int * GetExpandFactors() const
00131   { return m_ExpandFactors; }
00132 
00134   itkSetMacro( EdgePaddingValue, OutputPixelType );
00135 
00137   itkGetConstMacro( EdgePaddingValue, OutputPixelType );
00138 
00145   virtual void GenerateOutputInformation();
00146 
00152   virtual void GenerateInputRequestedRegion();
00153 
00154 #ifdef ITK_USE_CONCEPT_CHECKING
00155 
00156   itkConceptMacro(InputHasNumericTraitsCheck,
00157     (Concept::HasNumericTraits<typename TInputImage::PixelType>));
00158   itkConceptMacro(OutputHasNumericTraitsCheck,
00159     (Concept::HasNumericTraits<OutputPixelType>));
00160 
00162 #endif
00163 
00164 protected:
00165   ExpandImageFilter();
00166   ~ExpandImageFilter() {}
00167   void PrintSelf(std::ostream& os, Indent indent) const;
00168 
00178   virtual
00179   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00180                             int threadId );
00181 
00184   virtual void BeforeThreadedGenerateData();
00185 
00186 private:
00187   ExpandImageFilter(const Self&); //purposely not implemented
00188   void operator=(const Self&); //purposely not implemented
00189 
00190   unsigned int           m_ExpandFactors[ImageDimension];
00191   InterpolatorPointer    m_Interpolator;
00192   OutputPixelType        m_EdgePaddingValue;
00193  
00194 };
00195 
00196 } // end namespace itk
00197 
00198 #ifndef ITK_MANUAL_INSTANTIATION
00199 #include "itkExpandImageFilter.txx"
00200 #endif
00201 
00202 #endif
00203 

Generated at Mon Jul 12 2010 18:17:00 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000