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