KWStyle - itkExtrapolateImageFunction.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkExtrapolateImageFunction.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:35 $
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 _itkExtrapolateImageFunction_h
18 DEF #define _itkExtrapolateImageFunction_h
19
20 #include "itkImageFunction.h"
21
22 namespace itk
23 {
24
25 /** \class ExtrapolateImageFunction
26  * \brief Base class for all image extrapolaters.
27  *
28  * ExtrapolateImageFunction is the base for all ImageFunctions that
29  * extrapolates image intensity at a non-integer pixel position
30  * outside the image buffer.
31  * This class is templated over the input image type and the 
32  * coordinate representation type (e.g. float or double ).
33  *
34  * \warning This heirarchy of functions work only for images 
35  * with scalar pixel types.
36  *
37  * \ingroup ImageFunctions
38  * 
39  * */
40 template <class TInputImage, class TCoordRep = float>
41 class ITK_EXPORT ExtrapolateImageFunction : 
42 IND **public ImageFunction< TInputImage, 
43 LEN     ITK_TYPENAME NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep > 
44 {
45 public:
46   /** Standard class typedefs. */
47   typedef ExtrapolateImageFunction Self;
48 TDA   typedef ImageFunction<TInputImage,double,TCoordRep> Superclass;
49 TDA   typedef SmartPointer<Self> Pointer;
50 TDA   typedef SmartPointer<const Self>  ConstPointer;
51   
52   /** Run-time type information (and related methods). */
53   itkTypeMacro(ExtrapolateImageFunction, ImageFunction);
54
55   /** OutputType typedef support. */
56   typedef typename Superclass::OutputType OutputType;
57
58   /** InputImageType typedef support. */
59   typedef typename Superclass::InputImageType InputImageType;
60   
61   /** Dimension underlying input image. */
62   itkStaticConstMacro(ImageDimension, unsigned int,
63                       Superclass::ImageDimension);
64
65   /** Point typedef support. */
66   typedef typename Superclass::PointType PointType;
67
68   /** Index typedef support. */
69   typedef typename Superclass::IndexType IndexType;
70
71   /** ContinuousIndex typedef support. */
72   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
73
74   /** RealType typedef support. */
75 LEN   typedef typename NumericTraits<typename TInputImage::PixelType>::RealType RealType;
76
77   /** Extrapolate the image at a point position
78    *
79    * Returns the extrapolated image intensity at a 
80    * specified point position.
81    */
82   virtual OutputType Evaluate( const PointType& point ) const
83     {
84     ContinuousIndexType index;
85 LEN     this->GetInputImage()->TransformPhysicalPointToContinuousIndex( point, index );
86     return ( this->EvaluateAtContinuousIndex( index ) );
87     }
88
89   /** Extrapolate the image at a continuous index position
90    *
91    * Returns the extrapolated image intensity at a 
92    * specified point position.
93    */
94   virtual OutputType EvaluateAtContinuousIndex( 
95     const ContinuousIndexType & index ) const = 0;
96
97   /** Extrapolate the image at an index position.
98    *
99    * Returns the extrapolated image intensity at a 
100    * specified point position.
101    */
102   virtual OutputType EvaluateAtIndex( 
103     const IndexType & index ) const = 0;
104
105 protected:
106   ExtrapolateImageFunction(){};
107   ~ExtrapolateImageFunction(){};
108   void PrintSelf(std::ostream& os, Indent indent) const
109     { Superclass::PrintSelf( os, indent ); }
110
111 private:
112   ExtrapolateImageFunction( const Self& ); //purposely not implemented
113   void operator=( const Self& ); //purposely not implemented
114
115 };
116
117 // namespace itk
118
119 #endif
120

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