itkSphereSpatialFunction.h
Go to the documentation of this file.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);
00064
00066 itkGetMacro( Radius, double);
00067 itkSetMacro( Radius, double);
00069
00070 protected:
00071 SphereSpatialFunction();
00072 virtual ~SphereSpatialFunction();
00073 void PrintSelf(std::ostream& os, Indent indent) const;
00074
00075 private:
00076 SphereSpatialFunction(const Self&);
00077 void operator=(const Self&);
00078
00080 InputType m_Center;
00081
00083 double m_Radius;
00084
00085 };
00086
00087 }
00088
00089
00090 #define ITK_TEMPLATE_SphereSpatialFunction(_, EXPORT, x, y) namespace itk { \
00091 _(2(class EXPORT SphereSpatialFunction< ITK_TEMPLATE_2 x >)) \
00092 namespace Templates { typedef SphereSpatialFunction< ITK_TEMPLATE_2 x > \
00093 SphereSpatialFunction##y; } \
00094 }
00095
00096 #if ITK_TEMPLATE_EXPLICIT
00097 # include "Templates/itkSphereSpatialFunction+-.h"
00098 #endif
00099
00100 #if ITK_TEMPLATE_TXX
00101 # include "itkSphereSpatialFunction.txx"
00102 #endif
00103
00104 #endif
00105