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

itkExtrapolateImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkExtrapolateImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-13 15:36:31 $
00007   Version:   $Revision: 1.5 $
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 __itkExtrapolateImageFunction_h
00018 #define __itkExtrapolateImageFunction_h
00019 
00020 #include "itkImageFunction.h"
00021 
00022 namespace itk
00023 {
00024 
00040 template <class TInputImage, class TCoordRep = float>
00041 class ITK_EXPORT ExtrapolateImageFunction : 
00042   public ImageFunction< TInputImage, 
00043     ITK_TYPENAME NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep > 
00044 {
00045 public:
00047   typedef ExtrapolateImageFunction                        Self;
00048   typedef ImageFunction<TInputImage,double,TCoordRep>     Superclass;
00049   typedef SmartPointer<Self>                              Pointer;
00050   typedef SmartPointer<const Self>                        ConstPointer;
00051 
00053   itkTypeMacro(ExtrapolateImageFunction, ImageFunction);
00054 
00056   typedef typename Superclass::OutputType OutputType;
00057 
00059   typedef typename Superclass::InputImageType InputImageType;
00060 
00062   itkStaticConstMacro(ImageDimension, unsigned int,
00063                       Superclass::ImageDimension);
00064 
00066   typedef typename Superclass::PointType PointType;
00067 
00069   typedef typename Superclass::IndexType IndexType;
00070 
00072   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00073 
00075   typedef typename NumericTraits<typename TInputImage::PixelType>::RealType RealType;
00076 
00082   virtual OutputType Evaluate( const PointType& point ) const
00083     {
00084     ContinuousIndexType index;
00085     this->GetInputImage()->TransformPhysicalPointToContinuousIndex( point, index );
00086     return ( this->EvaluateAtContinuousIndex( index ) );
00087     }
00089 
00095   virtual OutputType EvaluateAtContinuousIndex( 
00096     const ContinuousIndexType & index ) const = 0;
00097 
00103   virtual OutputType EvaluateAtIndex( 
00104     const IndexType & index ) const = 0;
00105 
00106 protected:
00107   ExtrapolateImageFunction(){};
00108   ~ExtrapolateImageFunction(){};
00109   void PrintSelf(std::ostream& os, Indent indent) const
00110     { Superclass::PrintSelf( os, indent ); }
00111 
00112 private:
00113   ExtrapolateImageFunction( const Self& ); //purposely not implemented
00114   void operator=( const Self& ); //purposely not implemented
00115 
00116 };
00117 
00118 } // end namespace itk
00119 
00120 #endif
00121 

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