00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkSpatialFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2004/04/02 23:28:40 $ 00007 Version: $Revision: 1.17 $ 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 __itkSpatialFunction_h 00018 #define __itkSpatialFunction_h 00019 00020 #include "itkFunctionBase.h" 00021 #include "itkPoint.h" 00022 00023 namespace itk 00024 { 00025 00043 template <typename TOutput, 00044 unsigned int VImageDimension=3, 00045 typename TInput=Point<double, VImageDimension> > 00046 class ITK_EXPORT SpatialFunction : public FunctionBase<TInput, TOutput> 00047 { 00048 public: 00050 typedef SpatialFunction Self; 00051 typedef FunctionBase< TInput, TOutput> Superclass; 00052 typedef SmartPointer<Self> Pointer; 00053 typedef SmartPointer<const Self> ConstPointer; 00054 00056 itkTypeMacro(SpatialFunction, FunctionBase); 00057 00059 typedef typename Superclass::InputType InputType; 00060 00062 typedef typename Superclass::OutputType OutputType; 00063 00065 itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension); 00066 00069 virtual OutputType Evaluate( const InputType& input ) const = 0; 00070 00071 protected: 00072 SpatialFunction(); 00073 virtual ~SpatialFunction(); 00074 void PrintSelf(std::ostream& os, Indent indent) const; 00075 00076 private: 00077 SpatialFunction(const Self&); //purposely not implemented 00078 void operator=(const Self&); //purposely not implemented 00079 00080 }; 00081 00082 } // end namespace itk 00083 00084 #ifndef ITK_MANUAL_INSTANTIATION 00085 #include "itkSpatialFunction.txx" 00086 #endif 00087 00088 #endif