Public Member Functions | List of all members
mirtk::PointSamples Class Reference

#include <PointSamples.h>

Inheritance diagram for mirtk::PointSamples:
Inheritance graph
Collaboration diagram for mirtk::PointSamples:
Collaboration graph

Public Member Functions

 PointSamples (int n=0, int seed=0)
 
void SampleGaussian (double s=1.0)
 
void SampleGaussian (double m, double s)
 
void SampleGaussian (double mx, double my, double mz, double s)
 
void SampleGaussian (const Point &m, double s)
 
void SampleGaussian (const Point &m, double sx, double sy, double sz)
 
void SampleGaussian (double mx, double my, double mz, double sx, double sy, double sz)
 
void SampleGrid (const Point &p1, const Point &p2, int nx, int ny, int nz)
 Sample axes-aligned uniform grid.
 
void SampleGrid (const Point &p1, const Point &p2, double dx, double dy, double dz)
 Sample axes-aligned uniform grid.
 
void SampleGrid (double x1, double y1, double z1, double x2, double y2, double z2, int nx, int ny, int nz)
 Sample axes-aligned uniform grid.
 
void SampleGrid (double x1, double y1, double z1, double x2, double y2, double z2, double dx, double dy, double dz)
 Sample axes-aligned uniform grid.
 
void SampleRegularHalfSphere (double r=1.0)
 Add regular spherical point samples.
 
void SampleRegularHalfSphere (double c, double r)
 
void SampleRegularHalfSphere (const Point &c, double r=1.0)
 
void SampleRegularHalfSphere (const Point &c, double rx, double ry, double rz)
 
void SampleRegularHalfSphere (double cx, double cy, double cz, double r)
 
void SampleRegularHalfSphere (double cx, double cy, double cz, double rx, double ry, double rz)
 
void SampleRegularSphere (double r=1.0)
 Add regular spherical point samples.
 
void SampleRegularSphere (double c, double r)
 
void SampleRegularSphere (const Point &c, double r=1.0)
 
void SampleRegularSphere (const Point &c, double rx, double ry, double rz)
 
void SampleRegularSphere (double cx, double cy, double cz, double r)
 
void SampleRegularSphere (double cx, double cy, double cz, double rx, double ry, double rz)
 
void SampleSphere (double r=1.0)
 Add uniform spherical point samples.
 
void SampleSphere (double c, double r)
 
void SampleSphere (const Point &c, double r=1.0)
 
void SampleSphere (const Point &c, double rx, double ry, double rz)
 
void SampleSphere (double cx, double cy, double cz, double r)
 
void SampleSphere (double cx, double cy, double cz, double rx, double ry, double rz)
 
virtual ~PointSamples ()
 Destructor.
 
- Public Member Functions inherited from mirtk::PointSet
void Add (const Point &)
 Adding of a point to point set.
 
void Add (const PointSet &)
 Adding of a PointSet to Pointset.
 
void Add (double *)
 Adding of a Point to Pointset.
 
void AddVTK (const char *)
 
virtual void BoundingBox (Point &, Point &) const
 Bounding box.
 
int Capacity () const
 Return size of allocated storage capacity.
 
virtual Point CenterOfGravity () const
 Centre of gravity.
 
Point Centroid () const
 Get (unweighted) centroid of point set.
 
void Clear (bool deallocate=true)
 
virtual Point ClosestPoint (Point &)
 Closest point to given point.
 
void Del (const Point &)
 Deleting of a point from point set.
 
void Del (const PointSet &)
 Deleting of a PointSet from Pointset.
 
void Del (double *)
 Deleting of a Point from Pointset.
 
void Del ()
 Delete all points without freeing already allocated memory.
 
PointGetPoint (int)
 Get n-th point.
 
const PointGetPoint (int) const
 Get n-th point.
 
void GetPoint (int, Point &) const
 Get n-th point.
 
void GetPoint (int, double [3]) const
 Get n-th point.
 
int IsInside (double, double) const
 Tests if a point is inside the polygon defined by the point set.
 
bool operator!= (const PointSet &) const
 Test for inequality.
 
Pointoperator() (int)
 Operator for Point put access.
 
const Pointoperator() (int) const
 Operator for Point get access.
 
PointSet operator() (int, int) const
 Operator.
 
bool operator== (const PointSet &) const
 Test for equality.
 
virtual double PointDistance (Point &)
 Point set distance to given point.
 
 PointSet (int=0)
 Default constructor.
 
 PointSet (const PointSet &)
 Copy constructor.
 
 PointSet (const PointSet &, const Array< int > &)
 Copy subset constructor.
 
 PointSet (const PointSet &, const OrderedSet< int > &)
 Copy subset constructor.
 
void Read (const char *)
 Read pointset from file.
 
void ReadVTK (const char *)
 
void Reserve (int)
 Request a change in capacity.
 
void Resize (int, const Point &=Point())
 Resizes container so it contains n elements.
 
void SetPoint (int, const Point &)
 Set n-th point.
 
void SetPoint (int, const double [3])
 Set n-th point.
 
void ShrinkToFit ()
 Requests the container to reduce its capacity to fit its size.
 
void Size (int)
 
int Size () const
 Access function for size.
 
Point StandardDeviationEllipsoid () const
 Computes the standard deviation ellipsoid about the centroid of a point set.
 
void Write (const char *) const
 Write pointset to file.
 
void WriteVTK (const char *, vtkAbstractArray *=NULL) const
 
virtual ~PointSet ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 
- Protected Attributes inherited from mirtk::PointSet
Point_data
 Pointer to Points.
 
int _m
 Allocated size of PointSet.
 
int _n
 Actual size of PointSet.
 

Detailed Description

Auxiliary class for generation of point samples

Definition at line 32 of file PointSamples.h.

Constructor & Destructor Documentation

§ PointSamples()

mirtk::PointSamples::PointSamples ( int  n = 0,
int  seed = 0 
)

Constructor

Parameters
[in]nNumber of point samples.
[in]seedSeed of random number generator. Pass a negative value to use the current timestamp as seed value.

Member Function Documentation

§ SampleGaussian() [1/6]

void mirtk::PointSamples::SampleGaussian ( double  s = 1.0)

Add normally distributed point samples

Parameters
[in]sStandard deviation in each dimension.

§ SampleGaussian() [2/6]

void mirtk::PointSamples::SampleGaussian ( double  m,
double  s 
)

Add normally distributed point samples

Parameters
[in]mMean in each dimension.
[in]sStandard deviation in each dimension.

§ SampleGaussian() [3/6]

void mirtk::PointSamples::SampleGaussian ( double  mx,
double  my,
double  mz,
double  s 
)

Add normally distributed point samples

Parameters
[in]mxMean in x direction.
[in]myMean in y direction.
[in]mzMean in z direction.
[in]sStandard deviation in each dimension.

§ SampleGaussian() [4/6]

void mirtk::PointSamples::SampleGaussian ( const Point m,
double  s 
)

Add normally distributed point samples

Parameters
[in]mMean of normal distribution.
[in]sStandard deviation in each dimension.

§ SampleGaussian() [5/6]

void mirtk::PointSamples::SampleGaussian ( const Point m,
double  sx,
double  sy,
double  sz 
)

Add normally distributed point samples

Parameters
[in]mMean of normal distribution.
[in]sxStandard deviation in x direction.
[in]syStandard deviation in y direction.
[in]szStandard deviation in z direction.

§ SampleGaussian() [6/6]

void mirtk::PointSamples::SampleGaussian ( double  mx,
double  my,
double  mz,
double  sx,
double  sy,
double  sz 
)

Add normally distributed point samples

Parameters
[in]mxMean in x direction.
[in]myMean in y direction.
[in]mzMean in z direction.
[in]sxStandard deviation in x direction.
[in]syStandard deviation in y direction.
[in]szStandard deviation in z direction.

§ SampleRegularHalfSphere() [1/5]

void mirtk::PointSamples::SampleRegularHalfSphere ( double  c,
double  r 
)

Add regular spherical point samples

Parameters
[in]cCenter in each dimension.
[in]rRadius in each dimension.

§ SampleRegularHalfSphere() [2/5]

void mirtk::PointSamples::SampleRegularHalfSphere ( const Point c,
double  r = 1.0 
)

Add regular spherical point samples

Parameters
[in]cCenter point.
[in]rRadius in each dimension.

§ SampleRegularHalfSphere() [3/5]

void mirtk::PointSamples::SampleRegularHalfSphere ( const Point c,
double  rx,
double  ry,
double  rz 
)

Add regular spherical point samples

Parameters
[in]cCenter point.
[in]rxRadius in x direction.
[in]ryRadius in x direction.
[in]rzRadius in x direction.

§ SampleRegularHalfSphere() [4/5]

void mirtk::PointSamples::SampleRegularHalfSphere ( double  cx,
double  cy,
double  cz,
double  r 
)

Add regular spherical point samples

Parameters
[in]cxCenter in x direction.
[in]cyCenter in y direction.
[in]czCenter in z direction.
[in]rRadius in each dimension.

§ SampleRegularHalfSphere() [5/5]

void mirtk::PointSamples::SampleRegularHalfSphere ( double  cx,
double  cy,
double  cz,
double  rx,
double  ry,
double  rz 
)

Add regular spherical point samples

Parameters
[in]cxCenter in x direction.
[in]cyCenter in y direction.
[in]czCenter in z direction.
[in]rxRadius in x direction.
[in]ryRadius in x direction.
[in]rzRadius in x direction.

§ SampleRegularSphere() [1/5]

void mirtk::PointSamples::SampleRegularSphere ( double  c,
double  r 
)

Add regular spherical point samples

Parameters
[in]cCenter in each dimension.
[in]rRadius in each dimension.

§ SampleRegularSphere() [2/5]

void mirtk::PointSamples::SampleRegularSphere ( const Point c,
double  r = 1.0 
)

Add regular spherical point samples

Parameters
[in]cCenter point.
[in]rRadius in each dimension.

§ SampleRegularSphere() [3/5]

void mirtk::PointSamples::SampleRegularSphere ( const Point c,
double  rx,
double  ry,
double  rz 
)

Add regular spherical point samples

Parameters
[in]cCenter point.
[in]rxRadius in x direction.
[in]ryRadius in x direction.
[in]rzRadius in x direction.

§ SampleRegularSphere() [4/5]

void mirtk::PointSamples::SampleRegularSphere ( double  cx,
double  cy,
double  cz,
double  r 
)

Add regular spherical point samples

Parameters
[in]cxCenter in x direction.
[in]cyCenter in y direction.
[in]czCenter in z direction.
[in]rRadius in each dimension.

§ SampleRegularSphere() [5/5]

void mirtk::PointSamples::SampleRegularSphere ( double  cx,
double  cy,
double  cz,
double  rx,
double  ry,
double  rz 
)

Add regular spherical point samples

Parameters
[in]cxCenter in x direction.
[in]cyCenter in y direction.
[in]czCenter in z direction.
[in]rxRadius in x direction.
[in]ryRadius in x direction.
[in]rzRadius in x direction.

§ SampleSphere() [1/5]

void mirtk::PointSamples::SampleSphere ( double  c,
double  r 
)

Add uniform spherical point samples

Parameters
[in]cCenter in each dimension.
[in]rRadius in each dimension.

§ SampleSphere() [2/5]

void mirtk::PointSamples::SampleSphere ( const Point c,
double  r = 1.0 
)

Add uniform spherical point samples

Parameters
[in]cCenter point.
[in]rRadius in each dimension.

§ SampleSphere() [3/5]

void mirtk::PointSamples::SampleSphere ( const Point c,
double  rx,
double  ry,
double  rz 
)

Add uniform spherical point samples

Parameters
[in]cCenter point.
[in]rxRadius in x direction.
[in]ryRadius in x direction.
[in]rzRadius in x direction.

§ SampleSphere() [4/5]

void mirtk::PointSamples::SampleSphere ( double  cx,
double  cy,
double  cz,
double  r 
)

Add uniform spherical point samples

Parameters
[in]cxCenter in x direction.
[in]cyCenter in y direction.
[in]czCenter in z direction.
[in]rRadius in each dimension.

§ SampleSphere() [5/5]

void mirtk::PointSamples::SampleSphere ( double  cx,
double  cy,
double  cz,
double  rx,
double  ry,
double  rz 
)

Add uniform spherical point samples

Parameters
[in]cxCenter in x direction.
[in]cyCenter in y direction.
[in]czCenter in z direction.
[in]rxRadius in x direction.
[in]ryRadius in x direction.
[in]rzRadius in x direction.

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