KWStyle - itkLinearInterpolateImageFunction.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkLinearInterpolateImageFunction.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:41 $
7   Version:   $Revision: 1.4 $
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 DEF #ifndef _itkLinearInterpolateImageFunction_h
18 DEF #define _itkLinearInterpolateImageFunction_h
19
20 #include "itkInterpolateImageFunction.h"
21
22 namespace itk
23 {
24
25 /** \class LinearInterpolateImageFunction
26  * \brief Linearly interpolate an image at specified positions.
27  *
28  * LinearInterpolateImageFunction linearly interpolates image intensity at
29  * a non-integer pixel position. This class is templated
30  * over the input image type and the coordinate representation type 
31  * (e.g. float or double).
32  *
33  * This function works for N-dimensional images.
34  *
35  * \warning This function work only for images with scalar pixel
36  * types. For vector images use VectorLinearInterpolateImageFunction.
37  *
38  * \sa VectorLinearInterpolateImageFunction
39  *
40  * \ingroup ImageFunctions ImageInterpolators 
41  */
42 template <class TInputImage, class TCoordRep = float>
43 class ITK_EXPORT LinearInterpolateImageFunction : 
44 IND **public InterpolateImageFunction<TInputImage,TCoordRep> 
45 {
46 public:
47   /** Standard class typedefs. */
48   typedef LinearInterpolateImageFunction Self;
49 TDA   typedef InterpolateImageFunction<TInputImage,TCoordRep> Superclass;
50 TDA   typedef SmartPointer<Self> Pointer;
51 TDA   typedef SmartPointer<const Self>  ConstPointer;
52   
53   /** Run-time type information (and related methods). */
54   itkTypeMacro(LinearInterpolateImageFunction, InterpolateImageFunction);
55
56   /** Method for creation through the object factory. */
57   itkNewMacro(Self);  
58
59   /** OutputType typedef support. */
60   typedef typename Superclass::OutputType OutputType;
61
62   /** InputImageType typedef support. */
63   typedef typename Superclass::InputImageType InputImageType;
64
65   /** RealType typedef support. */
66   typedef typename Superclass::RealType RealType;
67
68   /** Dimension underlying input image. */
69   itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
70
71   /** Index typedef support. */
72   typedef typename Superclass::IndexType IndexType;
73
74   /** ContinuousIndex typedef support. */
75   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
76
77   /** Evaluate the function at a ContinuousIndex position
78    *
79    * Returns the linearly interpolated image intensity at a 
80    * specified point position. No bounds checking is done.
81    * The point is assume to lie within the image buffer.
82    *
83    * ImageFunction::IsInsideBuffer() can be used to check bounds before
84    * calling the method. */
85   virtual OutputType EvaluateAtContinuousIndex( 
86     const ContinuousIndexType & index ) const;
87
88 protected:
89   LinearInterpolateImageFunction();
90   ~LinearInterpolateImageFunction(){};
91   void PrintSelf(std::ostream& os, Indent indent) const;
92
93 private:
94   LinearInterpolateImageFunction( const Self& ); //purposely not implemented
95   void operator=( const Self& ); //purposely not implemented
96
97   /** Number of neighbors used in the interpolation */
98   static const unsigned long  m_Neighbors;  
99
100 };
101
102 // namespace itk
103
104 #ifndef ITK_MANUAL_INSTANTIATION
105 #include "itkLinearInterpolateImageFunction.txx"
106 #endif
107
108 #endif
109

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:19PM
© Kitware Inc.