Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Attributes
icl::geom::PointCloudObject Class Reference

Base implementation of the SceneObjectBase interface for compability with common icl::SceneObjects. More...

#include <PointCloudObject.h>

Inheritance diagram for icl::geom::PointCloudObject:
icl::geom::PointCloudObjectBase icl::geom::SceneObject

List of all members.

Public Member Functions

 PointCloudObject (bool withNormals=false, bool withColors=false, bool withLabels=false)
 creates an empty point cloud with with optionally initialized featuers
 PointCloudObject (int numPoints, bool withNormals=false, bool withColors=true, bool withLabels=false)
 create an un-organizied point cloud with N points
 PointCloudObject (int width, int height, bool organized=true, bool withNormals=false, bool withColors=true, bool withLabels=false)
 creates a new organized or un-organized SimplePointCloudObject instance
virtual bool supports (FeatureType t) const
 returns which features are supported (only XYZ and RGBA32f)
virtual bool isOrganized () const
 returns whether the points are 2D-ordered
virtual utils::Size getSize () const throw (utils::ICLException)
 returns the 2D size of the pointcloud (throws exception if not ordered)
virtual int getDim () const
 return the linearily ordered number of point in the point cloud
virtual void setSize (const utils::Size &size)
 adapts the point cloud size
virtual core::DataSegment
< float, 3 > 
selectXYZ ()
 returns XYZ data segment
virtual core::DataSegment
< float, 4 > 
selectXYZH ()
 returns XYZH data segment
virtual core::DataSegment
< float, 4 > 
selectRGBA32f ()
 returns the RGBA data segment (4-floats)
virtual core::DataSegment
< float, 4 > 
selectNormal ()
 returns the Normals data segment (4-floats)
virtual core::DataSegment
< icl32s, 1 > 
selectLabel ()
 returns the label data segment (32-bit signed integer)
virtual void customRender ()
 important, this is again, reimplemented in order to NOT draw the stuff manually here
virtual bool canAddFeature (FeatureType t) const
 only normals and color can be added in hindsight
virtual void addFeature (FeatureType t) throw (utils::ICLException)
 adds normals or colors in hindsight
virtual PointCloudObjectcopy () const
 deep copy function
void push_back (const Vec &point)
 just a simple wrapper for top-top level classe's addVertex method
void push_back (const Vec &point, const GeomColor &color)
 adds xyz point with given color
void push_back (const Vec &point, const Vec &normal, const GeomColor &color)
 adds xyz point with given normal and color

Protected Attributes

bool m_organized
 internal 2D organized flag
utils::Size m_dim2D
 2D dimension
bool m_hasNormals
 flag whether normals are given
bool m_hasColors
 flag whether the point cloud has colors
bool m_hasLabels
 flag indicating whether labels are supported
std::vector< int > m_labels
 label mask (activated in constructor)

Detailed Description

Base implementation of the SceneObjectBase interface for compability with common icl::SceneObjects.

This class replaces the former implementations

Normals

The PointCloudObject can be set up to have also normals in the constructor.

ToDo


Constructor & Destructor Documentation

icl::geom::PointCloudObject::PointCloudObject ( bool  withNormals = false,
bool  withColors = false,
bool  withLabels = false 
)

creates an empty point cloud with with optionally initialized featuers

icl::geom::PointCloudObject::PointCloudObject ( int  numPoints,
bool  withNormals = false,
bool  withColors = true,
bool  withLabels = false 
)

create an un-organizied point cloud with N points

icl::geom::PointCloudObject::PointCloudObject ( int  width,
int  height,
bool  organized = true,
bool  withNormals = false,
bool  withColors = true,
bool  withLabels = false 
)

creates a new organized or un-organized SimplePointCloudObject instance

Parameters:
widthnumber of points per line (if unordered, number of points)
heightnumber of points per row (if unordered, height is not used)
organizedspecifies whether there is a 2D data order or not withNormals if true, also normals will be created for each point

Member Function Documentation

adds normals or colors in hindsight

If the given feature is already contained, calling this function has no effect. The function calls lock() and unlock() internally

Reimplemented from icl::geom::PointCloudObjectBase.

virtual bool icl::geom::PointCloudObject::canAddFeature ( FeatureType  t) const [virtual]

only normals and color can be added in hindsight

Reimplemented from icl::geom::PointCloudObjectBase.

virtual PointCloudObject* icl::geom::PointCloudObject::copy ( ) const [inline, virtual]

deep copy function

Reimplemented from icl::geom::PointCloudObjectBase.

virtual void icl::geom::PointCloudObject::customRender ( ) [virtual]

important, this is again, reimplemented in order to NOT draw the stuff manually here

Reimplemented from icl::geom::PointCloudObjectBase.

virtual int icl::geom::PointCloudObject::getDim ( ) const [virtual]

return the linearily ordered number of point in the point cloud

Implements icl::geom::PointCloudObjectBase.

returns the 2D size of the pointcloud (throws exception if not ordered)

Implements icl::geom::PointCloudObjectBase.

virtual bool icl::geom::PointCloudObject::isOrganized ( ) const [virtual]

returns whether the points are 2D-ordered

Implements icl::geom::PointCloudObjectBase.

void icl::geom::PointCloudObject::push_back ( const Vec point) [inline]

just a simple wrapper for top-top level classe's addVertex method

This method does not work for organized point cloud objects. The organized flag is not checked for performance reason. The behaviour of calling push_back on ordered point clouds is undefined

void icl::geom::PointCloudObject::push_back ( const Vec point,
const GeomColor color 
) [inline]

adds xyz point with given color

See also:
push_back(const Vec&)
void icl::geom::PointCloudObject::push_back ( const Vec point,
const Vec normal,
const GeomColor color 
) [inline]

adds xyz point with given normal and color

See also:
push_back(const Vec&)

returns the label data segment (32-bit signed integer)

Only available if the the Label feature was explicitly enabled

Reimplemented from icl::geom::PointCloudObjectBase.

returns the Normals data segment (4-floats)

Only available if the constructor was called with "withNormals" set to true

Reimplemented from icl::geom::PointCloudObjectBase.

returns the RGBA data segment (4-floats)

Reimplemented from icl::geom::PointCloudObjectBase.

returns XYZ data segment

Reimplemented from icl::geom::PointCloudObjectBase.

returns XYZH data segment

Reimplemented from icl::geom::PointCloudObjectBase.

virtual void icl::geom::PointCloudObject::setSize ( const utils::Size size) [virtual]

adapts the point cloud size

if the sizes height is smaller than 1, the cloud becomes un-organized

Implements icl::geom::PointCloudObjectBase.

virtual bool icl::geom::PointCloudObject::supports ( FeatureType  t) const [virtual]

returns which features are supported (only XYZ and RGBA32f)

Implements icl::geom::PointCloudObjectBase.


Member Data Documentation

2D dimension

flag whether the point cloud has colors

flag indicating whether labels are supported

flag whether normals are given

std::vector<int> icl::geom::PointCloudObject::m_labels [protected]

label mask (activated in constructor)

internal 2D organized flag


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines