DGtal  0.9.3beta
Public Types | Public Member Functions | Private Member Functions
DGtal::StarShaped3D< TSpace > Class Template Referenceabstract

#include <DGtal/shapes/parametric/StarShaped3D.h>

Inheritance diagram for DGtal::StarShaped3D< TSpace >:
[legend]

Public Types

typedef TSpace Space
 
typedef Space::RealPoint RealPoint
 
typedef std::pair< double, double > AngularCoordinates
 

Public Member Functions

 StarShaped3D ()
 
 ~StarShaped3D ()
 
virtual RealPoint interiorPoint () const
 
virtual RealPoint getLowerBound () const =0
 
virtual RealPoint getUpperBound () const =0
 
virtual RealPoint center () const =0
 
virtual AngularCoordinates parameter (const RealPoint &p) const =0
 
virtual RealPoint x (const AngularCoordinates t) const =0
 
virtual RealPoint gradient (const AngularCoordinates t) const =0
 
virtual RealPoint rt (const AngularCoordinates t) const =0
 
virtual RealPoint rp (const AngularCoordinates t) const =0
 
virtual RealPoint rtt (const AngularCoordinates t) const =0
 
virtual RealPoint rpp (const AngularCoordinates t) const =0
 
virtual RealPoint rtp (const AngularCoordinates t) const =0
 
virtual Orientation orientation (const RealPoint &p) const
 
virtual RealPoint normal (AngularCoordinates t) const
 
virtual double gaussianCurvature (AngularCoordinates t) const
 
virtual double meanCurvature (AngularCoordinates t) const
 
virtual double arclength (AngularCoordinates t1, AngularCoordinates t2, unsigned int nb) const
 
virtual double surfacelength (AngularCoordinates t1, AngularCoordinates t2, unsigned int nb) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

StarShaped3Doperator= (const StarShaped3D &other)
 

Detailed Description

template<typename TSpace>
class DGtal::StarShaped3D< TSpace >

Description of template class 'StarShaped3D'

Aim: Abstract class that represents any star-shaped object in dimension 3. Such a shape as a center and any segment from this center to the shape boundary is included in the shape. These shapes can thus be parameterized by a couple of angles 'Teta,Phi' turning around the center.

StarShaped3D and its derived classes are models of CEuclideanBoundedShape and CEuclideanOrientedShape.

NB: A backport from ImaGene.

Template Parameters
TSpacespace in which the shape is defined.

Definition at line 71 of file StarShaped3D.h.

Member Typedef Documentation

template<typename TSpace>
typedef std::pair<double,double> DGtal::StarShaped3D< TSpace >::AngularCoordinates

Definition at line 77 of file StarShaped3D.h.

template<typename TSpace>
typedef Space::RealPoint DGtal::StarShaped3D< TSpace >::RealPoint

Definition at line 76 of file StarShaped3D.h.

template<typename TSpace>
typedef TSpace DGtal::StarShaped3D< TSpace >::Space

Definition at line 75 of file StarShaped3D.h.

Constructor & Destructor Documentation

template<typename TSpace>
DGtal::StarShaped3D< TSpace >::StarShaped3D ( )
inline

Constructor.

Definition at line 82 of file StarShaped3D.h.

83  {}
template<typename TSpace>
DGtal::StarShaped3D< TSpace >::~StarShaped3D ( )

Destructor.

Member Function Documentation

template<typename TSpace>
virtual double DGtal::StarShaped3D< TSpace >::arclength ( AngularCoordinates  t1,
AngularCoordinates  t2,
unsigned int  nb 
) const
virtual
Parameters
t1is a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
t2is a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi]. further from [t1].
nbthe number of points used to estimate the arclength between x(Teta1,Phi1) and x(Teta2,Phi2).
Returns
the estimated arclength.
template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::center ( ) const
pure virtual
Returns
the center of the star-shaped object.

Implemented in DGtal::Ball3D< TSpace >.

Referenced by DGtal::StarShaped3D< TSpace >::interiorPoint().

template<typename TSpace>
virtual double DGtal::StarShaped3D< TSpace >::gaussianCurvature ( AngularCoordinates  t) const
virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the gaussian curvature at point (x(t),y(t)), positive is convex, negative is concave when shape is to the left and the shape boundary is followed counterclockwise.
template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::getLowerBound ( ) const
pure virtual
Returns
the lower bound of the shape bounding box.

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::getUpperBound ( ) const
pure virtual
Returns
the upper bound of the shape bounding box.

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::gradient ( const AngularCoordinates  t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (gradf(M).

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::interiorPoint ( ) const
inlinevirtual
Returns
a point p such that 'isInside(p)' returns 'true'.

Definition at line 95 of file StarShaped3D.h.

References DGtal::StarShaped3D< TSpace >::center().

96  {
97  return center();
98  }
virtual RealPoint center() const =0
template<typename TSpace>
bool DGtal::StarShaped3D< TSpace >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TSpace>
virtual double DGtal::StarShaped3D< TSpace >::meanCurvature ( AngularCoordinates  t) const
virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi]
Returns
the mean curvature at point (x(t),y(t)), positive is convex, negative is concave when shape is to the left and the shape boundary is followed counterclockwise.
template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::normal ( AngularCoordinates  t) const
virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector normal made unitary which is the unit normal to the shape boundary looking inside the shape.
template<typename TSpace>
StarShaped3D& DGtal::StarShaped3D< TSpace >::operator= ( const StarShaped3D< TSpace > &  other)
private

Constructor. Forbidden by default (protected to avoid g++ warnings). Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TSpace>
virtual Orientation DGtal::StarShaped3D< TSpace >::orientation ( const RealPoint p) const
virtual

Return the orienatation of a point with respect to a shape.

Parameters
pinput point
Returns
the orientation of the point (<0 means inside, ...)
template<typename TSpace>
virtual AngularCoordinates DGtal::StarShaped3D< TSpace >::parameter ( const RealPoint p) const
pure virtual
Parameters
pany point in the sapce.
Returns
the angles parameters (Teta, Phi) corresponding to this point for the shape.

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::rp ( const AngularCoordinates  t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rp(M)) wich is the first partial derivative with respect to Phi.

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::rpp ( const AngularCoordinates  t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rpp(M)) wich is second the partial derivative with respect to Phi.

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::rt ( const AngularCoordinates  t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rt(M)) wich is the partial derivative with respect to Teta.

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::rtp ( const AngularCoordinates  t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rpp(M)) wich is second the partial derivative with respect to Teta then Phi.

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::rtt ( const AngularCoordinates  t) const
pure virtual
Parameters
tis a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (rtt(M)) wich is second the partial derivative with respect to Teta(twice).

Implemented in DGtal::Ball3D< TSpace >.

template<typename TSpace>
void DGtal::StarShaped3D< TSpace >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.
template<typename TSpace>
virtual double DGtal::StarShaped3D< TSpace >::surfacelength ( AngularCoordinates  t1,
AngularCoordinates  t2,
unsigned int  nb 
) const
virtual
Parameters
t1is a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
t2is a couple of Teta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi]. further from [t1].
nbthe number of points used to estimate the surface between x(Teta1,Phi1) and x(Teta2,Phi2).
Returns
the estimated surfacelength.
template<typename TSpace>
virtual RealPoint DGtal::StarShaped3D< TSpace >::x ( const AngularCoordinates  t) const
pure virtual
Parameters
tis a couple of Theta && Phi wich are 2 angles respectivly between [0,2PI] and [0,Pi].
Returns
the vector (x(t),y(t),z(t)) which is the position on the shape boundary.

Implemented in DGtal::Ball3D< TSpace >.


The documentation for this class was generated from the following file: