00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkSphereSpatialFunction_h
00019 #define __itkSphereSpatialFunction_h
00020
00021 #include "itkInteriorExteriorSpatialFunction.h"
00022
00023 namespace itk
00024 {
00025
00034 template <unsigned int VImageDimension=3,typename TInput=Point<double,VImageDimension> >
00035 class ITK_EXPORT SphereSpatialFunction
00036 : public InteriorExteriorSpatialFunction<VImageDimension,TInput>
00037 {
00038 public:
00040 typedef SphereSpatialFunction<VImageDimension,TInput> Self;
00041 typedef InteriorExteriorSpatialFunction<VImageDimension,TInput> Superclass;
00042 typedef SmartPointer<Self> Pointer;
00043 typedef SmartPointer<const Self> ConstPointer;
00044
00046 itkNewMacro(Self);
00047
00049 itkTypeMacro(SphereSpatialFunction,InteriorExteriorSpatialFunction);
00050
00052 typedef typename Superclass::InputType InputType;
00053
00055 typedef typename Superclass::OutputType OutputType;
00056
00058 OutputType Evaluate(const InputType& position) const;
00059
00061 itkGetMacro( Center, InputType);
00062 itkSetMacro( Center, InputType);
00063
00065 itkGetMacro( Radius, double);
00066 itkSetMacro( Radius, double);
00067
00068 protected:
00069 SphereSpatialFunction();
00070 virtual ~SphereSpatialFunction();
00071 void PrintSelf(std::ostream& os, Indent indent) const;
00072
00073 private:
00074 SphereSpatialFunction(const Self&);
00075 void operator=(const Self&);
00076
00078 InputType m_Center;
00079
00081 double m_Radius;
00082
00083 };
00084
00085 }
00086
00087 #ifndef ITK_MANUAL_INSTANTIATION
00088 #include "itkSphereSpatialFunction.txx"
00089 #endif
00090
00091 #endif