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

itkVectorExpandImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVectorExpandImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/11/13 00:52:54 $
00007   Version:   $Revision: 1.10 $
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 __itkVectorExpandImageFilter_h
00018 #define __itkVectorExpandImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkVectorInterpolateImageFunction.h"
00022 #include "itkVectorLinearInterpolateImageFunction.h"
00023 
00024 namespace itk
00025 {
00026 
00076 template <
00077 class TInputImage, 
00078 class TOutputImage 
00079 >
00080 class ITK_EXPORT VectorExpandImageFilter:
00081   public ImageToImageFilter<TInputImage,TOutputImage>
00082 {
00083 public:
00085   typedef VectorExpandImageFilter         Self;
00086   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00087   typedef SmartPointer<Self>  Pointer;
00088   typedef SmartPointer<const Self>  ConstPointer;
00089 
00091   itkNewMacro(Self);  
00092 
00094   typedef typename TInputImage::Pointer InputImagePointer;
00095   typedef typename TOutputImage::Pointer OutputImagePointer;
00096   typedef typename TOutputImage::RegionType OutputImageRegionType;
00097 
00099   itkTypeMacro(VectorExpandImageFilter, ImageToImageFilter);
00100 
00102   itkStaticConstMacro(ImageDimension, unsigned int,
00103                       TInputImage::ImageDimension);
00104 
00106   typedef typename Superclass::InputImageType  InputImageType;
00107   typedef typename Superclass::OutputImageType OutputImageType;
00108 
00110   typedef typename OutputImageType::PixelType  OutputPixelType;
00111   typedef typename OutputPixelType::ValueType  OutputValueType;
00112   typedef typename InputImageType::PixelType  InputPixelType;
00113   typedef typename InputPixelType::ValueType   InputValueType;
00114 
00116   enum { VectorDimension = InputPixelType::Dimension };
00117 
00119   typedef double CoordRepType;
00120   typedef VectorInterpolateImageFunction<InputImageType,CoordRepType> 
00121     InterpolatorType;
00122   typedef typename InterpolatorType::Pointer InterpolatorPointer;
00123   typedef VectorLinearInterpolateImageFunction<InputImageType,CoordRepType> 
00124     DefaultInterpolatorType;
00125 
00127   itkSetObjectMacro( Interpolator, InterpolatorType );
00128 
00130   itkGetObjectMacro( Interpolator, InterpolatorType );
00131 
00134   virtual void SetExpandFactors( const unsigned int factors[] );
00135   virtual void SetExpandFactors( const unsigned int factor );
00136 
00138   const unsigned int * GetExpandFactors() const
00139     { return m_ExpandFactors; }
00140 
00142   virtual void SetEdgePaddingValue( const OutputPixelType& value );
00143 
00145   virtual const OutputPixelType& GetEdgePaddingValue()
00146     { return m_EdgePaddingValue; }
00147 
00154   virtual void GenerateOutputInformation();
00155 
00161   virtual void GenerateInputRequestedRegion();
00162 
00163 protected:
00164 
00165   VectorExpandImageFilter();
00166   ~VectorExpandImageFilter() {};
00167   void PrintSelf(std::ostream& os, Indent indent) const;
00168 
00177   virtual
00178   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00179                             int threadId );
00180   
00183   virtual void BeforeThreadedGenerateData();
00184 
00185 private:
00186   VectorExpandImageFilter(const Self&); //purposely not implemented
00187   void operator=(const Self&); //purposely not implemented
00188 
00189   unsigned int           m_ExpandFactors[ImageDimension];
00190   InterpolatorPointer    m_Interpolator;
00191   OutputPixelType        m_EdgePaddingValue;
00192  
00193 };
00194 
00195 } // end namespace itk
00196 
00197 #ifndef ITK_MANUAL_INSTANTIATION
00198 #include "itkVectorExpandImageFilter.txx"
00199 #endif
00200 
00201 #endif

Generated at Fri May 21 01:15:30 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000