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

itkVectorNearestNeighborInterpolateImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVectorNearestNeighborInterpolateImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-03 15:11:45 $
00007   Version:   $Revision: 1.7 $
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 __itkVectorNearestNeighborInterpolateImageFunction_h
00018 #define __itkVectorNearestNeighborInterpolateImageFunction_h
00019 
00020 #include "itkVectorInterpolateImageFunction.h"
00021 
00022 namespace itk
00023 {
00024 
00041 template <class TInputImage, class TCoordRep = double>
00042 class ITK_EXPORT VectorNearestNeighborInterpolateImageFunction : 
00043   public VectorInterpolateImageFunction<TInputImage,TCoordRep> 
00044 {
00045 public:
00046 
00048   typedef VectorNearestNeighborInterpolateImageFunction         Self;
00049   typedef VectorInterpolateImageFunction<TInputImage,TCoordRep> Superclass;
00050   typedef SmartPointer<Self>                                    Pointer;
00051   typedef SmartPointer<const Self>                              ConstPointer;
00052 
00054   itkNewMacro(Self);  
00055 
00057   itkTypeMacro(VectorNearestNeighborInterpolateImageFunction, 
00058     VectorInterpolateImageFunction);
00059 
00061   typedef typename Superclass::InputImageType InputImageType;
00062   typedef typename Superclass::PixelType      PixelType;
00063   typedef typename Superclass::ValueType      ValueType;
00064   typedef typename Superclass::RealType       RealType;
00065 
00067   itkStaticConstMacro(Dimension, unsigned int,
00068                        Superclass::Dimension);
00069 
00071   itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
00072 
00074   typedef typename Superclass::IndexType IndexType;
00075 
00077   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00078 
00080   typedef typename Superclass::OutputType OutputType;
00081 
00090   virtual OutputType EvaluateAtContinuousIndex( 
00091     const ContinuousIndexType & index ) const
00092     {
00093     IndexType nindex;
00094     this->ConvertContinuousIndexToNearestIndex(index, nindex);
00095     return static_cast<OutputType>( this->GetInputImage()->GetPixel( nindex ) );
00096     }
00098 
00099 protected:
00100   VectorNearestNeighborInterpolateImageFunction(){};
00101   ~VectorNearestNeighborInterpolateImageFunction(){};
00102   void PrintSelf(std::ostream& os, Indent indent) const
00103    { Superclass::PrintSelf( os, indent ); }
00104 
00105 private:
00106   VectorNearestNeighborInterpolateImageFunction(const Self&); //purposely not implemented
00107   void operator=(const Self&); //purposely not implemented
00108 };
00109 
00110 } // end namespace itk
00111 
00112 #endif
00113 

Generated at Tue Sep 15 05:22:04 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000