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: 2006/04/03 15:07:52 $
00007   Version:   $Revision: 1.15 $
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 __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 float  ExpandFactorsType;
00120 
00122   typedef double CoordRepType;
00123   typedef VectorInterpolateImageFunction<InputImageType,CoordRepType> 
00124     InterpolatorType;
00125   typedef typename InterpolatorType::Pointer InterpolatorPointer;
00126   typedef VectorLinearInterpolateImageFunction<InputImageType,CoordRepType> 
00127     DefaultInterpolatorType;
00128 
00130   itkSetObjectMacro( Interpolator, InterpolatorType );
00131 
00133   itkGetObjectMacro( Interpolator, InterpolatorType );
00134 
00137   virtual void SetExpandFactors( const ExpandFactorsType factors[] );
00138   virtual void SetExpandFactors( const ExpandFactorsType factor );
00139   virtual void SetExpandFactors( const unsigned int factors[] );
00141 
00143   const ExpandFactorsType * GetExpandFactors() const
00144     { return m_ExpandFactors; }
00145 
00147   virtual void SetEdgePaddingValue( const OutputPixelType& value );
00148 
00150   virtual const OutputPixelType& GetEdgePaddingValue()
00151     { return m_EdgePaddingValue; }
00152 
00159   virtual void GenerateOutputInformation();
00160 
00166   virtual void GenerateInputRequestedRegion();
00167 
00168 #ifdef ITK_USE_CONCEPT_CHECKING
00169 
00170   itkConceptMacro(InputHasNumericTraitsCheck,
00171                   (Concept::HasNumericTraits<InputValueType>));
00172   itkConceptMacro(OutputHasNumericTraitsCheck,
00173                   (Concept::HasNumericTraits<OutputValueType>));
00174 
00176 #endif
00177 
00178 protected:
00179 
00180   VectorExpandImageFilter();
00181   ~VectorExpandImageFilter() {};
00182   void PrintSelf(std::ostream& os, Indent indent) const;
00183 
00192   virtual
00193   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00194                             int threadId );
00195 
00198   virtual void BeforeThreadedGenerateData();
00199 
00200 private:
00201   VectorExpandImageFilter(const Self&); //purposely not implemented
00202   void operator=(const Self&); //purposely not implemented
00203 
00204   ExpandFactorsType      m_ExpandFactors[ImageDimension];
00205   InterpolatorPointer    m_Interpolator;
00206   OutputPixelType        m_EdgePaddingValue;
00207  
00208 };
00209 
00210 } // end namespace itk
00211 
00212 #ifndef ITK_MANUAL_INSTANTIATION
00213 #include "itkVectorExpandImageFilter.txx"
00214 #endif
00215 
00216 #endif
00217 

Generated at Tue Jul 29 23:17:53 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000