MeVisLab Toolbox Reference
ml::MainAxisPCA Class Reference

This class computes the main axis for a point cloud by a principal component analysis. More...

#include <MainAxisPCA.h>

Public Member Functions

 MainAxisPCA ()
 Constructor.
 
virtual ~MainAxisPCA ()
 Destructor.
 
void computeMainAxis (const std::vector< Vector3 > &points)
 Computes the main axes on behalf of the given point cloud.
 
void getMainAxis (Vector3 &longestAxis, Vector3 &midAxis, Vector3 &shortestAxis) const
 Returns the main axes (normalized). The axes are sorted by extent, largest first.
 
void getExtension (float &longestExtent, float &midExtent, float &shortestExtent) const
 Returns the three extents of the object aligned bounding box, largest first.
 
Vector3 getLargestMainAxis () const
 Returns a copy of the largest main axis.
 
float getLargestExtension () const
 Returns the largest extend of the object aligned bounding box.
 
Vector3 getCenterOfMass () const
 Returns the center of mass of the object, which is the mean of all 3d points.
 
Vector3 getMidPoint () const
 Returns the middle point of the object aligned bounding box.
 

Detailed Description

This class computes the main axis for a point cloud by a principal component analysis.

Definition at line 25 of file MainAxisPCA.h.

Constructor & Destructor Documentation

◆ MainAxisPCA()

ml::MainAxisPCA::MainAxisPCA ( )

Constructor.

◆ ~MainAxisPCA()

virtual ml::MainAxisPCA::~MainAxisPCA ( )
virtual

Destructor.

Member Function Documentation

◆ computeMainAxis()

void ml::MainAxisPCA::computeMainAxis ( const std::vector< Vector3 > & points)

Computes the main axes on behalf of the given point cloud.

The principal component vectors are established internally.

◆ getCenterOfMass()

Vector3 ml::MainAxisPCA::getCenterOfMass ( ) const

Returns the center of mass of the object, which is the mean of all 3d points.

◆ getExtension()

void ml::MainAxisPCA::getExtension ( float & longestExtent,
float & midExtent,
float & shortestExtent ) const

Returns the three extents of the object aligned bounding box, largest first.

◆ getLargestExtension()

float ml::MainAxisPCA::getLargestExtension ( ) const

Returns the largest extend of the object aligned bounding box.

◆ getLargestMainAxis()

Vector3 ml::MainAxisPCA::getLargestMainAxis ( ) const

Returns a copy of the largest main axis.

◆ getMainAxis()

void ml::MainAxisPCA::getMainAxis ( Vector3 & longestAxis,
Vector3 & midAxis,
Vector3 & shortestAxis ) const

Returns the main axes (normalized). The axes are sorted by extent, largest first.

◆ getMidPoint()

Vector3 ml::MainAxisPCA::getMidPoint ( ) const

Returns the middle point of the object aligned bounding box.


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