Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkSphereSignedDistanceFunction_h
00018 #define __itkSphereSignedDistanceFunction_h
00019
00020 #include "itkShapeSignedDistanceFunction.h"
00021 #include "itkVector.h"
00022
00023 namespace itk
00024 {
00025
00041 template <typename TCoordRep, unsigned int VSpaceDimension>
00042 class ITK_EXPORT SphereSignedDistanceFunction :
00043 public ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension >
00044 {
00045 public:
00047 typedef SphereSignedDistanceFunction Self;
00048 typedef ShapeSignedDistanceFunction< TCoordRep, VSpaceDimension > Superclass;
00049 typedef SmartPointer<Self> Pointer;
00050 typedef SmartPointer<const Self> ConstPointer;
00051
00053 itkTypeMacro(SphereSignedDistanceFunction, ShapeSignedDistancFunction);
00054
00056 itkNewMacro( Self );
00057
00059 typedef typename Superclass::OutputType OutputType;
00060
00062 typedef typename Superclass::InputType InputType;
00063
00065 itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension);
00066
00068 typedef typename Superclass::CoordRepType CoordRepType;
00069
00071 typedef typename Superclass::PointType PointType;
00072
00074 typedef typename Superclass::ParametersType ParametersType;
00075
00078 virtual void SetParameters( const ParametersType & );
00079 virtual unsigned int GetNumberOfShapeParameters(void) const
00080 { return 1; }
00081 virtual unsigned int GetNumberOfPoseParameters(void) const
00082 { return SpaceDimension; }
00084
00086 virtual OutputType Evaluate( const PointType& point ) const;
00087
00088 protected:
00089 SphereSignedDistanceFunction();
00090 ~SphereSignedDistanceFunction(){};
00091
00092 void PrintSelf(std::ostream& os, Indent indent) const;
00093
00094 private:
00095 SphereSignedDistanceFunction( const Self& );
00096 void operator=( const Self& );
00097
00098 typedef Vector<CoordRepType,itkGetStaticConstMacro(SpaceDimension)> VectorType;
00099
00100 VectorType m_Translation;
00101 double m_Radius;
00102
00103 };
00104
00105 }
00106
00107
00108
00109 #define ITK_TEMPLATE_SphereSignedDistanceFunction(_, EXPORT, x, y) namespace itk { \
00110 _(2(class EXPORT SphereSignedDistanceFunction< ITK_TEMPLATE_2 x >)) \
00111 namespace Templates { typedef SphereSignedDistanceFunction< ITK_TEMPLATE_2 x > \
00112 SphereSignedDistanceFunction##y; } \
00113 }
00114
00115 #if ITK_TEMPLATE_EXPLICIT
00116 # include "Templates/itkSphereSignedDistanceFunction+-.h"
00117 #endif
00118
00119 #if ITK_TEMPLATE_TXX
00120 # include "itkSphereSignedDistanceFunction.txx"
00121 #endif
00122
00123 #endif
00124