00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkTorusInteriorExteriorSpatialFunction_h
00019 #define __itkTorusInteriorExteriorSpatialFunction_h
00020
00021 #include "vnl/vnl_vector.h"
00022 #include "itkInteriorExteriorSpatialFunction.h"
00023 #include "itkCovariantVector.h"
00024
00025 namespace itk
00026 {
00027
00038 template <unsigned int VDimension=3, typename TInput=Point<double,3> >
00039 class ITK_EXPORT TorusInteriorExteriorSpatialFunction:
00040 public InteriorExteriorSpatialFunction<VDimension, TInput>
00041 {
00042 public:
00043
00045 typedef TorusInteriorExteriorSpatialFunction Self;
00046 typedef InteriorExteriorSpatialFunction<VDimension> Superclass;
00047 typedef SmartPointer<Self> Pointer;
00048 typedef SmartPointer<const Self> ConstPointer;
00049
00051 itkTypeMacro(TorusInteriorExteriorSpatialFunction,InteriorExteriorSpatialFunction);
00052
00054 itkNewMacro(Self);
00055
00057 typedef typename Superclass::InputType InputType;
00058
00060 typedef typename Superclass::OutputType OutputType;
00061
00063 OutputType Evaluate(const InputType& position) const;
00064
00067 itkGetMacro( Origin, InputType);
00068 itkSetMacro( Origin, InputType);
00070
00072 itkGetMacro( MajorRadius, double);
00073 itkSetMacro( MajorRadius, double);
00075
00077 itkGetMacro( MinorRadius, double);
00078 itkSetMacro( MinorRadius, double);
00080
00081 protected:
00082 TorusInteriorExteriorSpatialFunction();
00083 virtual ~TorusInteriorExteriorSpatialFunction();
00084 void PrintSelf(std::ostream& os, Indent indent) const;
00085
00086 private:
00087 TorusInteriorExteriorSpatialFunction(const Self&);
00088 void operator=(const Self&);
00089
00092 InputType m_Origin;
00093
00095 double m_MajorRadius;
00096
00098 double m_MinorRadius;
00099
00100 };
00101
00102 }
00103
00104
00105 #define ITK_TEMPLATE_TorusInteriorExteriorSpatialFunction(_, EXPORT, x, y) namespace itk { \
00106 _(2(class EXPORT TorusInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 x >)) \
00107 namespace Templates { typedef TorusInteriorExteriorSpatialFunction< ITK_TEMPLATE_2 x > \
00108 TorusInteriorExteriorSpatialFunction##y; } \
00109 }
00110
00111 #if ITK_TEMPLATE_EXPLICIT
00112 # include "Templates/itkTorusInteriorExteriorSpatialFunction+-.h"
00113 #endif
00114
00115 #if ITK_TEMPLATE_TXX
00116 # include "itkTorusInteriorExteriorSpatialFunction.txx"
00117 #endif
00118
00119 #endif
00120