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; }
00083
00085 virtual OutputType Evaluate( const PointType& point ) const;
00086
00087 protected:
00088 SphereSignedDistanceFunction();
00089 ~SphereSignedDistanceFunction(){};
00090
00091 void PrintSelf(std::ostream& os, Indent indent) const;
00092
00093 private:
00094 SphereSignedDistanceFunction( const Self& );
00095 void operator=( const Self& );
00096
00097 typedef Vector<CoordRepType,itkGetStaticConstMacro(SpaceDimension)> VectorType;
00098
00099 VectorType m_Translation;
00100 double m_Radius;
00101
00102 };
00103
00104 }
00105
00106 #ifndef ITK_MANUAL_INSTANTIATION
00107 #include "itkSphereSignedDistanceFunction.txx"
00108 #endif
00109
00110 #endif