Public Member Functions | Protected Attributes | List of all members
mirtk::PointSet Class Reference

#include <PointSet.h>

Inheritance diagram for mirtk::PointSet:
Inheritance graph
Collaboration diagram for mirtk::PointSet:
Collaboration graph

Public Member Functions

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.
 

Protected Attributes

Point_data
 Pointer to Points.
 
int _m
 Allocated size of PointSet.
 
int _n
 Actual size of PointSet.
 

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)
 

Detailed Description

Point set

Definition at line 45 of file PointSet.h.

Member Function Documentation

§ AddVTK()

void mirtk::PointSet::AddVTK ( const char *  )

Add point set from file in VTK format

Note
Use this function only when MIRTK_Numerics_WITH_VTK is 1.

§ Clear()

void mirtk::PointSet::Clear ( bool  deallocate = true)

Clearing of PointSet

Parameters
[in]deallocateWhether to deallocate memory.

§ ReadVTK()

void mirtk::PointSet::ReadVTK ( const char *  )

Read point set from file in VTK format

Note
Use this function only when MIRTK_Numerics_WITH_VTK is 1.

§ Size()

void mirtk::PointSet::Size ( int  n)
inline

Set container size (and capacity)

The result of this function is equivalent to

but with only one reallocation operation. It sets both the size and the capacity of the point set container.

Definition at line 434 of file PointSet.h.

§ WriteVTK()

void mirtk::PointSet::WriteVTK ( const char *  ,
vtkAbstractArray *  = NULL 
) const

Write point set to file in VTK format

Note
Use this function only when MIRTK_Numerics_WITH_VTK is 1.

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