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: 2008-10-17 16:30:54 $
00007   Version:   $Revision: 1.16 $
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 <class TInputImage, class TOutputImage>
00077 class ITK_EXPORT VectorExpandImageFilter:
00078   public ImageToImageFilter<TInputImage,TOutputImage>
00079 {
00080 public:
00082   typedef VectorExpandImageFilter                       Self;
00083   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00084   typedef SmartPointer<Self>                            Pointer;
00085   typedef SmartPointer<const Self>                      ConstPointer;
00086 
00088   itkNewMacro(Self);  
00089 
00091   typedef typename TInputImage::Pointer     InputImagePointer;
00092   typedef typename TOutputImage::Pointer    OutputImagePointer;
00093   typedef typename TOutputImage::RegionType OutputImageRegionType;
00094 
00096   itkTypeMacro(VectorExpandImageFilter, ImageToImageFilter);
00097 
00099   itkStaticConstMacro(ImageDimension, unsigned int,
00100                       TInputImage::ImageDimension);
00101 
00103   typedef typename Superclass::InputImageType  InputImageType;
00104   typedef typename Superclass::OutputImageType OutputImageType;
00105 
00107   typedef typename OutputImageType::PixelType  OutputPixelType;
00108   typedef typename OutputPixelType::ValueType  OutputValueType;
00109   typedef typename InputImageType::PixelType   InputPixelType;
00110   typedef typename InputPixelType::ValueType   InputValueType;
00111 
00113   enum { VectorDimension = InputPixelType::Dimension };
00114 
00116   typedef float  ExpandFactorsType;
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 ExpandFactorsType factors[] );
00135   virtual void SetExpandFactors( const ExpandFactorsType factor );
00136   virtual void SetExpandFactors( const unsigned int factors[] );
00138 
00140   const ExpandFactorsType * GetExpandFactors() const
00141     { return m_ExpandFactors; }
00142 
00144   virtual void SetEdgePaddingValue( const OutputPixelType& value );
00145 
00147   virtual const OutputPixelType& GetEdgePaddingValue()
00148     { return m_EdgePaddingValue; }
00149 
00156   virtual void GenerateOutputInformation();
00157 
00163   virtual void GenerateInputRequestedRegion();
00164 
00165 #ifdef ITK_USE_CONCEPT_CHECKING
00166 
00167   itkConceptMacro(InputHasNumericTraitsCheck,
00168                   (Concept::HasNumericTraits<InputValueType>));
00169   itkConceptMacro(OutputHasNumericTraitsCheck,
00170                   (Concept::HasNumericTraits<OutputValueType>));
00171 
00173 #endif
00174 
00175 protected:
00176 
00177   VectorExpandImageFilter();
00178   ~VectorExpandImageFilter() {};
00179   void PrintSelf(std::ostream& os, Indent indent) const;
00180 
00189   virtual
00190   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00191                             int threadId );
00192 
00195   virtual void BeforeThreadedGenerateData();
00196 
00197 private:
00198   VectorExpandImageFilter(const Self&); //purposely not implemented
00199   void operator=(const Self&); //purposely not implemented
00200 
00201   ExpandFactorsType      m_ExpandFactors[ImageDimension];
00202   InterpolatorPointer    m_Interpolator;
00203   OutputPixelType        m_EdgePaddingValue;
00204  
00205 };
00206 
00207 } // end namespace itk
00208 
00209 #ifndef ITK_MANUAL_INSTANTIATION
00210 #include "itkVectorExpandImageFilter.txx"
00211 #endif
00212 
00213 #endif
00214 

Generated at Thu Nov 6 00:40:28 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000