KWStyle - itkSpatialFunction.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkSpatialFunction.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:48 $
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 #ifndef __itkSpatialFunction_h
18 #define __itkSpatialFunction_h
19
20 #include "itkFunctionBase.h"
21 #include "itkPoint.h"
22
23 namespace itk
24 {
25
26 /** \class SpatialFunction
27  * \brief N-dimensional spatial function class
28  *
29  * itk::SpatialFunction provides the ability to define functions that can
30 LEN  * be evaluated at an arbitrary point in space (physical or otherwise). The return
31  * type is specified by the derived class, and the input to the function
32  * is an n-dimensional itk::Point.
33  *
34  * Although itk::ImageFunction and itk::SpatialFunction are quite similar,
35  * itk::SpatialFunction derived classes exist without reference to an Image
36  * type.
37  *
38  * SpatialFunction is templated over output type (the data type
39  * returned by an evaluate() call) and dimensionality.
40  *
41  * \ingroup SpatialFunctions
42  */
43 template <typename TOutput, 
44           unsigned int VImageDimension=3,
45           typename TInput=Point<double, VImageDimension> >
46 class ITK_EXPORT SpatialFunction : public FunctionBase<TInput, TOutput>
47 {
48 public:
49   /** Standard class typedefs. */
50   typedef SpatialFunction Self;
51 TDA   typedef FunctionBase< TInput, TOutput> Superclass;
52 TDA   typedef SmartPointer<Self>  Pointer;
53 TDA   typedef SmartPointer<const Self>  ConstPointer;
54   
55   /** Run-time type information (and related methods). */
56   itkTypeMacro(SpatialFunction, FunctionBase);
57
58   /** Input type for the function. */
59   typedef typename Superclass::InputType InputType;
60
61   /** Output type for the function. */
62   typedef typename Superclass::OutputType OutputType;
63
64   /** Spatial dimension. */
65   itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);
66
67   /** Evaluate the function at a given position. Remember, position is
68 IND *** represented by an n-d itk::Point object with data type double. */
69   virtual OutputType Evaluate( const InputType& input ) const = 0;
70
71 protected:
72   SpatialFunction();
73   virtual ~SpatialFunction();
74   void PrintSelf(std::ostream& os, Indent indent) const;
75
76 private:
77   SpatialFunction(const Self&); //purposely not implemented
78   void operator=(const Self&); //purposely not implemented
79
80 };
81
82 // end namespace itk
83
84 #ifndef ITK_MANUAL_INSTANTIATION
85 #include "itkSpatialFunction.txx"
86 #endif
87
88 #endif
89

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