00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkSphereSpatialFunction_h
00018 #define __itkSphereSpatialFunction_h
00019
00020 #include "itkInteriorExteriorSpatialFunction.h"
00021
00022 namespace itk
00023 {
00024
00033 template <unsigned int VImageDimension=3,typename TInput=Point<double,VImageDimension> >
00034 class ITK_EXPORT SphereSpatialFunction
00035 : public InteriorExteriorSpatialFunction<VImageDimension,TInput>
00036 {
00037 public:
00039 typedef SphereSpatialFunction<VImageDimension,TInput> Self;
00040 typedef InteriorExteriorSpatialFunction<VImageDimension,TInput> Superclass;
00041 typedef SmartPointer<Self> Pointer;
00042 typedef SmartPointer<const Self> ConstPointer;
00043
00045 itkNewMacro(Self);
00046
00048 itkTypeMacro(SphereSpatialFunction,InteriorExteriorSpatialFunction);
00049
00051 typedef typename Superclass::InputType InputType;
00052
00054 typedef typename Superclass::OutputType OutputType;
00055
00057 OutputType Evaluate(const InputType& position) const;
00058
00060 itkGetConstMacro( Center, InputType);
00061 itkSetMacro( Center, InputType);
00063
00065 itkGetConstMacro( Radius, double);
00066 itkSetMacro( Radius, double);
00068
00069 protected:
00070 SphereSpatialFunction();
00071 virtual ~SphereSpatialFunction();
00072 void PrintSelf(std::ostream& os, Indent indent) const;
00073
00074 private:
00075 SphereSpatialFunction(const Self&);
00076 void operator=(const Self&);
00077
00079 InputType m_Center;
00080
00082 double m_Radius;
00083
00084 };
00085
00086 }
00087
00088
00089 #define ITK_TEMPLATE_SphereSpatialFunction(_, EXPORT, x, y) namespace itk { \
00090 _(2(class EXPORT SphereSpatialFunction< ITK_TEMPLATE_2 x >)) \
00091 namespace Templates { typedef SphereSpatialFunction< ITK_TEMPLATE_2 x > \
00092 SphereSpatialFunction##y; } \
00093 }
00094
00095 #if ITK_TEMPLATE_EXPLICIT
00096 # include "Templates/itkSphereSpatialFunction+-.h"
00097 #endif
00098
00099 #if ITK_TEMPLATE_TXX
00100 # include "itkSphereSpatialFunction.txx"
00101 #endif
00102
00103 #endif
00104