Orfeo Toolbox  3.16
itkInterpolateImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkInterpolateImageFunction.h,v $
5  Language: C++
6  Date: $Date: 2009-10-29 11:18:40 $
7  Version: $Revision: 1.22 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkInterpolateImageFunction_h
18 #define __itkInterpolateImageFunction_h
19 
20 #include "itkImageFunction.h"
21 
22 namespace itk
23 {
24 
41 template <class TInputImage, class TCoordRep = double>
43  public ImageFunction< TInputImage,
44  ITK_TYPENAME NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep >
45 {
46 public:
49  typedef ImageFunction<TInputImage,
50  typename NumericTraits<typename TInputImage::PixelType>::RealType,
51  TCoordRep> Superclass;
54 
57 
59  typedef typename Superclass::OutputType OutputType;
60 
62  typedef typename Superclass::InputImageType InputImageType;
63 
65  itkStaticConstMacro(ImageDimension, unsigned int,
66  Superclass::ImageDimension);
67 
69  typedef typename Superclass::PointType PointType;
70 
72  typedef typename Superclass::IndexType IndexType;
73  typedef typename Superclass::IndexValueType IndexValueType;
74 
76  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
77 
79  typedef typename NumericTraits<typename TInputImage::PixelType>::RealType RealType;
80 
89  virtual OutputType Evaluate( const PointType& point ) const
90  {
91  ContinuousIndexType index;
92  this->GetInputImage()->TransformPhysicalPointToContinuousIndex( point, index );
93  return ( this->EvaluateAtContinuousIndex( index ) );
94  }
95 
106  virtual OutputType EvaluateAtContinuousIndex(
107  const ContinuousIndexType & index ) const = 0;
108 
117  virtual OutputType EvaluateAtIndex( const IndexType & index ) const
118  {
119  return ( static_cast<RealType>( this->GetInputImage()->GetPixel( index ) ) );
120  }
121 
122 protected:
125  void PrintSelf(std::ostream& os, Indent indent) const
126  { Superclass::PrintSelf( os, indent ); }
127 
128 private:
129  InterpolateImageFunction( const Self& ); //purposely not implemented
130  void operator=( const Self& ); //purposely not implemented
131 
132 };
133 
134 } // end namespace itk
135 
136 #endif

Generated at Sat Feb 2 2013 23:46:14 for Orfeo Toolbox with doxygen 1.8.1.1