Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkPointSet Class Reference

mitkPointSet - a class to represent geometry in the form of a set of points in two or three dimensional space. More...

#include <mitkPointSet.h>

Inherited by mitkKdTreePointSet.

Inheritance diagram for mitkPointSet:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 mitkPointSet ()
virtual ~mitkPointSet ()
 mitkPointSet (unsigned int numberOfPoints, unsigned int pointSetDimension, double fillElement=0)
 mitkPointSet (mitkPointSet *pointSet)
void GetPoint (unsigned int i, ScalarParameterType *p)
double GetPoint (unsigned int i, unsigned int dim)
void SetPoint (unsigned int i, ScalarParameterType *p)
vector< double > * GetPointsInSequence (vector< int > *sequence)
vector< double > * GetPointData ()
double * GetPointDataPtr ()
void SetPointData (vector< double > *pointSet, unsigned int dimension)
void SetPointData (double *pointSet, unsigned int dimension, unsigned int numberOfPoints)
vector< double > * GetPointsInDimension (unsigned int sDimension)
void SetPointsInDimension (vector< double > *points, unsigned int sDimension)
void SetPointsInDimension (double fillElement, unsigned int sDimension)
void SetPointData (mitkMesh *mesh)
void GetPointData (mitkMesh *mesh)
void GetWeight (unsigned int i, vector< double > *w)
void SetWeight (unsigned int i, vector< double > *w)
vector< double > * GetWeightsInSequence (vector< int > *sequence)
void SetWeightData (vector< double > *weights, unsigned int dimension)
void SetWeightData (double *weights, unsigned int dimension, unsigned int numberOfPoints)
vector< double > * GetWeightData ()
double * GetWeightDataPtr ()
void SetPointSetMask (vector< int > *pointSetMask)
vector< int > * GetPointSetMask ()
void SetPointSetMaskFlag (bool maskFlag)
bool GetPointSetMaskFlag ()
void ReadPointDataFromFile (char *inFileName, int pointSetDimension, int dataType)
void WritePointDataToFile (char *outFileName)
unsigned int GetNumberOfPoints ()
void SetNumberOfPoints (unsigned int num)
int GetPointSetDimension ()
void SetPointSetDimension (unsigned int pointSetDimension)
int GetWeightsDimension ()
void GetBoundingBox (double b[6])
void GetBoundingBox (float b[6])
void GetCentroid (double p[3])
virtual void GetNearestPoint (double *query_point, double *result_point, int &i)
virtual void GetKNearestPoints (double *query_point, unsigned int k, vector< int > &indices)
virtual void GetKNearestPoints (vector< double > *query_point, unsigned int k, vector< int > &indices)
virtual void GetNearestPoints (mitkPointSet *query_pointset, vector< int > &indices)
virtual void GetPointsInBoundingBox (mitkBoundingBox< double > &box, vector< int > &indices)
virtual void GetPointsInRadius (double *query_point, double radius, vector< int > &indices)
void Fill (double fillElement)
bool RemoveDuplicates ()
void ConvertPointSet2Dto3D ()
virtual void Initialize ()
virtual void Clear ()
bool IsPointSetEmpty ()
bool IsWeightsEmpty ()
bool IsInitialized ()
void ShallowCopy (mitkPointSet *pointSet)
void DeepCopy (mitkPointSet *pointSet)
void Merge (mitkPointSet *pointSet)
void Reserve (unsigned int s, unsigned int d=3)
void SetOriginAndDirection (double o[3], int d[3])

Detailed Description

mitkPointSet - a class to represent geometry in the form of a set of points in two or three dimensional space.

mitkPointSet is a class to represent geometry in the form of a set of points in two or three dimensional space. It provides lots of basic point set handling methods and several k nearest neighbor searching methods.


Constructor & Destructor Documentation

mitkPointSet::mitkPointSet  ) 
 

Constructor.

virtual mitkPointSet::~mitkPointSet  )  [virtual]
 

De-constructor.

mitkPointSet::mitkPointSet unsigned int  numberOfPoints,
unsigned int  pointSetDimension,
double  fillElement = 0
 

Constructor filling with initial elements

Parameters:
numberOfPoints The number of points.
pointSetDimension The point set dimension.
fillElement The element value to fill.

mitkPointSet::mitkPointSet mitkPointSet pointSet  ) 
 

Constructor with a point set

Parameters:
pointSet The input point set.


Member Function Documentation

virtual void mitkPointSet::Clear  )  [virtual]
 

Deconstruct the point set object.

void mitkPointSet::ConvertPointSet2Dto3D  ) 
 

Convert point set's dimension from 2D to 3D.

void mitkPointSet::DeepCopy mitkPointSet pointSet  ) 
 

Initialize the point set data by another point set.(copy data)

Parameters:
pointSet The pointer to input point set.

void mitkPointSet::Fill double  fillElement  ) 
 

Fill the point set by a single element.

Parameters:
fillElement The filling element

void mitkPointSet::GetBoundingBox float  b[6]  ) 
 

Get bounding box of the point set.

Parameters:
b[0] return minimum coordinate value in x-axis
b[1] return maximum coordinate value in x-axis
b[2] return minimum coordinate value in y-axis
b[3] return maximum coordinate value in y-axis
b[4] return minimum coordinate value in z-axis
b[5] return maximum coordinate value in z-axis

void mitkPointSet::GetBoundingBox double  b[6]  ) 
 

Get bounding box of the point set.

Parameters:
b[0] return minimum coordinate value in x-axis
b[1] return maximum coordinate value in x-axis
b[2] return minimum coordinate value in y-axis
b[3] return maximum coordinate value in y-axis
b[4] return minimum coordinate value in z-axis
b[5] return maximum coordinate value in z-axis

void mitkPointSet::GetCentroid double  p[3]  ) 
 

Get centroid of the point set.

Parameters:
p[0] return centroid coordinate value in x-axis
p[1] return centroid coordinate value in y-axis
p[2] return centroid coordinate value in z-axis

virtual void mitkPointSet::GetKNearestPoints vector< double > *  query_point,
unsigned int  k,
vector< int > &  indices
[virtual]
 

Get k nearest points to the query point.

Parameters:
query_point The query point stored in a vector
k The number of points to search
indices Return a vector contains result point's indices

Reimplemented in mitkKdTreePointSet.

virtual void mitkPointSet::GetKNearestPoints double *  query_point,
unsigned int  k,
vector< int > &  indices
[virtual]
 

Get k nearest point to the query point.

Parameters:
query_point The query point stored in an array
k The number of points to search
indices Return a vector contains result point's indices

Reimplemented in mitkKdTreePointSet.

virtual void mitkPointSet::GetNearestPoint double *  query_point,
double *  result_point,
int &  i
[virtual]
 

Get a nearest point to the query point.

Parameters:
query_point The query point
result_point Return the pointer to result point
i Return the index to result point

Reimplemented in mitkKdTreePointSet.

virtual void mitkPointSet::GetNearestPoints mitkPointSet query_pointset,
vector< int > &  indices
[virtual]
 

Get nearest point to a set of query points.

Parameters:
query_pointset The query points stored in a mitkPointSet
indices Return a vector contains result point's indices

Reimplemented in mitkKdTreePointSet.

unsigned int mitkPointSet::GetNumberOfPoints  ) 
 

Get number of points in the point set.

Returns:
Return the number of points.

double mitkPointSet::GetPoint unsigned int  i,
unsigned int  dim
 

Get a point from the point set.

Parameters:
i The index of the point.
p An array to store the returned point.

void mitkPointSet::GetPoint unsigned int  i,
ScalarParameterType *  p
 

Get a point from the point set.

Parameters:
i The index of the point.
p An array to store the returned point.

void mitkPointSet::GetPointData mitkMesh mesh  ) 
 

Get points data to a mesh object.

Parameters:
mesh A mesh object to store the points data.

vector<double>* mitkPointSet::GetPointData  ) 
 

Get all the points in the point set.

Returns:
Return a vector contains the points.

double* mitkPointSet::GetPointDataPtr  )  [inline]
 

Get the pointer of point data.

Returns:
Return a pointer to the points data.

int mitkPointSet::GetPointSetDimension  )  [inline]
 

Get the point set's dimension.

Returns:
Return the point set's dimension.

vector<int>* mitkPointSet::GetPointSetMask  )  [inline]
 

Get the mask of point set.

Returns:
Return the pointer to the mask vector.

bool mitkPointSet::GetPointSetMaskFlag  )  [inline]
 

Get using mask flag.

Returns:
Return the mask flag.

virtual void mitkPointSet::GetPointsInBoundingBox mitkBoundingBox< double > &  box,
vector< int > &  indices
[virtual]
 

Get points in a bounding box.

Parameters:
box The query bounding box
indices Return a vector contains result point's indices

Reimplemented in mitkKdTreePointSet.

vector<double>* mitkPointSet::GetPointsInDimension unsigned int  sDimension  ) 
 

Get points in a specified dimension.

Parameters:
sDimension A specified dimension.
Returns:
Return a vector contains the points.

virtual void mitkPointSet::GetPointsInRadius double *  query_point,
double  radius,
vector< int > &  indices
[virtual]
 

Get points in a given circle/sphere.

Parameters:
query_point The query point
radius The radius of the given circle
indices Return a vector contains result point's indices

Reimplemented in mitkKdTreePointSet.

vector<double>* mitkPointSet::GetPointsInSequence vector< int > *  sequence  ) 
 

Get points using a sequence mask .

Parameters:
sequence The mask with points' index.
Returns:
Return a vector contains mask-specified points.

void mitkPointSet::GetWeight unsigned int  i,
vector< double > *  w
 

Get a point's weight vector.

Parameters:
i The index to specified point(weight).
w A vector to contain the weight vector.

vector<double>* mitkPointSet::GetWeightData  ) 
 

Get all the weights.

Returns:
Return a vector contains the weights.

double* mitkPointSet::GetWeightDataPtr  )  [inline]
 

Get weights data's pointer.

Returns:
Return the pointer to the weights data.

int mitkPointSet::GetWeightsDimension  )  [inline]
 

Get weights set's dimension.

Returns:
Return the weights set's dimension.

vector<double>* mitkPointSet::GetWeightsInSequence vector< int > *  sequence  ) 
 

Get weights using a sequence mask .

Parameters:
sequence The mask with points' index.
Returns:
Return a vector contains mask-specified weights.

virtual void mitkPointSet::Initialize  )  [virtual]
 

Initialize the point set.(calculate centroid, bounding box, build tree)

Reimplemented in mitkKdTreePointSet.

bool mitkPointSet::IsInitialized  )  [inline]
 

Check if the point set is initialized.

Returns:
Return true if the point set is initialized.

bool mitkPointSet::IsPointSetEmpty  ) 
 

Check if the point set is empty.

Returns:
Return true if the point set is empty.

bool mitkPointSet::IsWeightsEmpty  ) 
 

Check if the weight set is empty.

Returns:
Return true if the weight set is empty.

void mitkPointSet::Merge mitkPointSet pointSet  ) 
 

Merge another point set to the point set.

Parameters:
pointSet The pointer to input point set.

void mitkPointSet::ReadPointDataFromFile char *  inFileName,
int  pointSetDimension,
int  dataType
 

Read points data form a txt file.

Parameters:
inFileName File name.
pointSetDimension Point set dimension.
dataType Date type.

bool mitkPointSet::RemoveDuplicates  ) 
 

Remove duplicate points in the point set.

void mitkPointSet::Reserve unsigned int  s,
unsigned int  d = 3
 

Reserve a memory space for the point set. (resize the point set) If s is smaller than numberOfPoints, do noting.

Parameters:
s The size of reserved space.
d The point set dimension.

void mitkPointSet::SetNumberOfPoints unsigned int  num  )  [inline]
 

Set number of points in the point set.

Parameters:
num The number of points.

void mitkPointSet::SetOriginAndDirection double  o[3],
int  d[3]
 

mitkPointSet represents points in physical space. This function just convert from one to another.

void mitkPointSet::SetPoint unsigned int  i,
ScalarParameterType *  p
 

Set a point in the point set.

Parameters:
i The index of the point.
p An array with input point data.

void mitkPointSet::SetPointData mitkMesh mesh  ) 
 

Set data of the point set by a mesh object.

Parameters:
mesh A mesh object to provide points data.

void mitkPointSet::SetPointData double *  pointSet,
unsigned int  dimension,
unsigned int  numberOfPoints
 

Set data of the point set

Parameters:
pointSet The pointer to an array contains the points data.
dimension The point set's dimension.
numberOfPoints The number of points in the array.

void mitkPointSet::SetPointData vector< double > *  pointSet,
unsigned int  dimension
 

Set data of the point set

Parameters:
pointSet The pointer to a vector contains the points data.
dimension The point set's dimension.

void mitkPointSet::SetPointSetDimension unsigned int  pointSetDimension  )  [inline]
 

Set point set's dimension.

Parameters:
pointSetDimension The point set's dimension.

void mitkPointSet::SetPointSetMask vector< int > *  pointSetMask  ) 
 

Set the mask of point set.

Parameters:
pointSetMask The pointer to a vector contains point index data.

void mitkPointSet::SetPointSetMaskFlag bool  maskFlag  )  [inline]
 

Set using mask flag.

Parameters:
maskFlag Use mask in point set get/set method if maskFlag is true.

void mitkPointSet::SetPointsInDimension double  fillElement,
unsigned int  sDimension
 

Set data of the point set in a specified dimension by filling an element.

Parameters:
fillElement The element value to fill.
sDimension A specified dimension of the point set.

void mitkPointSet::SetPointsInDimension vector< double > *  points,
unsigned int  sDimension
 

Set data of the point set in a specified dimension.

Parameters:
points The pointer to a vector contains the points data.
sDimension A specified dimension of the point set.

void mitkPointSet::SetWeight unsigned int  i,
vector< double > *  w
 

Set a point's weight vector

Parameters:
i The index to specified point(weight).
w A vector contains the weight vector.

void mitkPointSet::SetWeightData double *  weights,
unsigned int  dimension,
unsigned int  numberOfPoints
 

Set weights data by an array

Parameters:
weights The pointer to an array contains the weights data.
dimension The weight set's dimension.
numberOfPoints The number of weights in the array.

void mitkPointSet::SetWeightData vector< double > *  weights,
unsigned int  dimension
 

Set weights data by a vector

Parameters:
weights The pointer to a vector contains the weights data.
dimension The weight set's dimension.

void mitkPointSet::ShallowCopy mitkPointSet pointSet  ) 
 

Initialize the point set data by another point set.(copy pointer, don't copy data)

Parameters:
pointSet The pointer to input point set.

void mitkPointSet::WritePointDataToFile char *  outFileName  ) 
 

Write the points data to a txt file.

Parameters:
outFileName File name.


The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:04:57 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3