Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
icl::geom::PointCloudObjectBase Class Referenceabstract

Base class for point cloud data types. More...

#include <PointCloudObjectBase.h>

Inheritance diagram for icl::geom::PointCloudObjectBase:
icl::geom::SceneObject icl::geom::PCLPointCloudObject< PCLPointType > icl::geom::PointCloudObject icl::geom::PointCloudSegment

Public Types

enum  FeatureType {
  Intensity, Label, Depth, BGR,
  BGRA, BGRA32s, XYZ, XYZH,
  Normal, RGBA32f, NUM_FEATURES
}
 List of well known features. More...
 

Public Member Functions

 PointCloudObjectBase ()
 Default constructor. More...
 
virtual void setTime (const utils::Time &t)
 sets the current timestamp More...
 
virtual const utils::TimegetTime () const
 returns the current timestamp More...
 
virtual bool supports (FeatureType t) const =0
 interface for supported features More...
 
virtual bool canAddFeature (FeatureType t) const
 interface function for dynamic Point cloud types that can dynamically add features More...
 
virtual void addFeature (FeatureType t) throw (utils::ICLException)
 interface for adding a feature to an existing point cloud instance More...
 
virtual bool isOrganized () const =0
 interface for supported features More...
 
virtual utils::Size getSize () const =0 throw (utils::ICLException)
 returns the 2D size of the pointcloud (throws exception if not ordered) More...
 
virtual int getDim () const =0
 return the linearily ordered number of point in the point cloud More...
 
virtual void setSize (const utils::Size &size)=0
 adapts the 2D size and enables the 'organized mode' More...
 
void setDim (int dim)
 sets the number of contained points (and enables the unorganized mode) More...
 
virtual core::DataSegment
< float, 3 > 
selectXYZ ()
 well know features XYZ (three floats, this feature must usually be available) More...
 
virtual core::DataSegment
< float, 4 > 
selectXYZH ()
 common way to store XYZ-data (4th float define homogeneous part) More...
 
virtual core::DataSegment
< float, 1 > 
selectIntensity ()
 well known feature Intensity (single float values) More...
 
virtual core::DataSegment
< float, 1 > 
selectDepth ()
 well known feature Depth (single float values) More...
 
virtual core::DataSegment
< icl32s, 1 > 
selectLabel ()
 well known feature Intensity (single 32bit int values) More...
 
virtual core::DataSegment
< icl8u, 3 > 
selectBGR ()
 well known feature Intensity (three byte vectors ordered BGR) More...
 
virtual core::DataSegment
< icl8u, 4 > 
selectBGRA ()
 well known feature Intensity (four byte vectors ordered BGRA) More...
 
virtual core::DataSegment
< icl32s, 1 > 
selectBGRA32s ()
 well known feature Intensity (single int value encoding byte-wise BGRA) More...
 
virtual core::DataSegment
< float, 4 > 
selectNormal ()
 well known feature Normal (4 float values) More...
 
virtual core::DataSegment
< float, 4 > 
selectRGBA32f ()
 well known feature RGBA (4 float values, ordred RGBA) More...
 
virtual core::DataSegmentBase select (const std::string &featureName)
 dynamic feature selection function More...
 
const core::DataSegment< float, 3 > selectXYZ () const
 const xyz data More...
 
const core::DataSegment< float, 4 > selectXYZH () const
 const xyzh data More...
 
const core::DataSegment< float, 1 > selectIntensity () const
 const intensity data More...
 
const core::DataSegment< float, 1 > selectDepth () const
 const intensity data More...
 
const core::DataSegment
< icl32s, 1 > 
selectLabel () const
 const label data More...
 
const core::DataSegment< icl8u, 3 > selectBGR () const
 const bgr data More...
 
const core::DataSegment< icl8u, 4 > selectBGRA () const
 const rgba data More...
 
const core::DataSegment
< icl32s, 1 > 
selectBGRA32s () const
 const bgra32s data More...
 
const core::DataSegment< float, 4 > selectNormal () const
 const normals data More...
 
const core::DataSegment< float, 4 > selectRGBA32f () const
 const rgba32f data More...
 
const core::DataSegmentBase select (const std::string &featureName) const
 const dynamic/custom data More...
 
void setColorsFromImage (const core::ImgBase &image) throw (utils::ICLException)
 tints the point cloud pixel from the given image data More...
 
void extractColorsToImage (core::ImgBase &image, bool withAlpha=false) const throw (utils::ICLException)
 extracts the color information and stores it into the given image More...
 
void setDefaultVertexColor (const GeomColor &color)
 sets the color that is used to render points if color information is available More...
 
virtual GeomColor getDefaultVertexColor () const
 implements the SceneObject's virtual getter function for this feature More...
 
virtual std::vector< std::string > getSupportedDynamicFeatures () const
 For subclasses that provide Dynamic features, this function must be implemented. More...
 
virtual void customRender ()
 custom rendering method More...
 
void setUseDrawNormalLines (bool use, float lineLength=40, int granularity=4)
 set use draw normal lines More...
 
virtual PointCloudObjectBasecopy () const
 deep copy interface (needs to be implemented by subclasses) More...
 
virtual void deepCopy (PointCloudObjectBase &dst) const
 deeply copies all well-known features that are shared by this and dst More...
 
virtual bool equals (const PointCloudObjectBase &dst, bool compareOnlySharedFeatures=false, bool allowDifferentColorTypes=true, float tollerance=1.0e-5) const
 returns whether two points clouds are equal More...
 
std::map< std::string,
std::string > & 
getMetaData ()
 returns the meta data associated with this point cloud object More...
 
const std::map< std::string,
std::string > & 
getMetaData () const
 returns the meta data associated with this point cloud object (const) More...
 
const std::string & getMetaData (const std::string &key) const throw (utils::ICLException)
 returns the meta data associated with a given key More...
 
bool hasMetaData (const std::string &key) const
 returns whether meta data to the given key is associated More...
 
bool hasAnyMetaData () const
 returns whether any meta data is available More...
 
void setMetaData (const std::string &key, const std::string &value)
 sets the meta data entry for given key to value More...
 
void clearAllMetaData ()
 deletes all meta data entries More...
 
void clearMetaData (const std::string &key)
 clears the meta data for a given key More...
 
std::vector< std::string > getAllMetaDataEntries () const
 returns a list of all available meta data entires More...
 
- Public Member Functions inherited from icl::geom::SceneObject
ICLGeom_API SceneObject ()
 create an object More...
 
ICLGeom_API SceneObject (const std::string &type, const float *params)
 create by string: More...
 
ICLGeom_API SceneObject (const std::string &objFileName) throw (utils::ICLException)
 creates a scene object from given .obj file More...
 
 SceneObject (const SceneObject &other)
 deep copy of SceneObject instance More...
 
ICLGeom_API SceneObjectoperator= (const SceneObject &other)
 assignment operator for deep copy More...
 
virtual ICLGeom_API ~SceneObject ()
 Empty destructor (but virtual) More...
 
ICLGeom_API std::vector< Vec > & getVertices ()
 returns object vertices More...
 
ICLGeom_API const std::vector
< Vec > & 
getVertices () const
 returns object vertices (const) More...
 
ICLGeom_API const std::vector
< Vec > & 
getNormals () const
 returns object normals (const) More...
 
ICLGeom_API std::vector
< GeomColor > & 
getVertexColors ()
 returns object vertex colors More...
 
ICLGeom_API const std::vector
< GeomColor > & 
getVertexColors () const
 returns object vertex colors (const) More...
 
ICLGeom_API std::vector
< Primitive * > & 
getPrimitives ()
 returns object's primitives (lines, quads, etc...) More...
 
ICLGeom_API const std::vector
< Primitive * > & 
getPrimitives () const
 returns object's primitives (lines, quads, etc...) (const) More...
 
ICLGeom_API void setVisible (int oredTypes, bool visible, bool recursive=true)
 changes visibility of given primitive type More...
 
ICLGeom_API void setVisible (const std::string &what, bool recursive=true)
 convenience method that allows for setting several visibility properties at once More...
 
void setVisible (const char *what, bool recursive=true)
 explicit version for const char pointer to avoid an explicit cast to bool/int More...
 
ICLGeom_API bool isVisible (Primitive::Type t) const
 returns visibility of given primitive type More...
 
ICLGeom_API void addVertex (const Vec &p, const GeomColor &color=GeomColor(255, 0, 0, 255))
 adds a new vertex to this object More...
 
ICLGeom_API void addSharedTexture (utils::SmartPtr< qt::GLImg > gli)
 adds a GLImg as shared texture More...
 
ICLGeom_API void addSharedTexture (const core::ImgBase *image, core::scalemode sm=core::interpolateLIN)
 adds an core::ImgBase * as shared texutre More...
 
ICLGeom_API void addNormal (const Vec &n)
 adds a new normal to this object More...
 
ICLGeom_API void addLine (int x, int y, const GeomColor &color=GeomColor(100, 100, 100, 255))
 adds a new line to this object More...
 
ICLGeom_API void addTriangle (int a, int b, int c, int na, int nb, int nc, const GeomColor &color=GeomColor(0, 100, 250, 255))
 adds a new triangle to this onject More...
 
void addTriangle (int a, int b, int c, const GeomColor &color=GeomColor(0, 100, 250, 255))
 convenience method for creation of a triangle with auto-normals More...
 
ICLGeom_API void addQuad (int a, int b, int c, int d, int na, int nb, int nc, int nd, const GeomColor &color=GeomColor(0, 100, 250, 255))
 adds a new triangle to this onject More...
 
void addQuad (int a, int b, int c, int d, const GeomColor &color=GeomColor(0, 100, 250, 255))
 convenience method for creation of a quad with auto-normals More...
 
ICLGeom_API void addPolygon (int nPoints, const int *vertexIndices, const GeomColor &color=GeomColor(0, 100, 250, 255), const int *normalIndices=0)
 add a polygon to this object (note triangles and quads are slower here) More...
 
ICLGeom_API void addTexture (int a, int b, int c, int d, const core::ImgBase *texture, int na, int nb, int nc, int nd, bool createTextureOnce=true, core::scalemode sm=core::interpolateLIN)
 
void addTexture (int a, int b, int c, int d, const core::ImgBase *texture, bool createTextureOnce=true, core::scalemode sm=core::interpolateLIN)
 convenience method for creation of a texture with auto-normals More...
 
ICLGeom_API void addTexture (int a, int b, int c, int d, int sharedTextureIndex, int na=-1, int nb=-1, int nc=-1, int nd=-1)
 adds are shared texture primitive More...
 
ICLGeom_API void addTexture (const core::ImgBase *image, int numPoints, const int *vertexIndices, const utils::Point32f *texCoords, const int *normalIndices=0, bool createTextureOnce=true)
 adds a GenericTexturePrimitive for custom texCoords More...
 
ICLGeom_API void addTextureGrid (int w, int h, const core::ImgBase *image, const icl32f *px, const icl32f *py, const icl32f *pz, const icl32f *pnx=0, const icl32f *pny=0, const icl32f *pnz=0, int stride=1, bool createTextureOnce=true, core::scalemode sm=core::interpolateLIN)
 adds a texture that is drawn on a 2D grid of vertices in 3D space More...
 
ICLGeom_API void addTwoSidedTextureGrid (int w, int h, const core::ImgBase *front, const core::ImgBase *back, const icl32f *px, const icl32f *py, const icl32f *pz, const icl32f *pnx=0, const icl32f *pny=0, const icl32f *pnz=0, int stride=1, bool createFrontOnce=true, bool createBackOnce=true, core::scalemode sm=core::interpolateLIN)
 adds a texture grid that has two different texture for the two faces More...
 
ICLGeom_API void addTwoSidedTGrid (int w, int h, const Vec *vertices, const Vec *normals=0, const GeomColor &frontColor=GeomColor(0, 100, 255, 255), const GeomColor &backColor=GeomColor(255, 0, 100, 255), const GeomColor &lineColor=GeomColor(0, 255, 100, 255), bool drawLines=false, bool drawQuads=true)
 adds a two sided grid (sides may have different colors) More...
 
ICLGeom_API void addTextTexture (int a, int b, int c, int d, const std::string &text, const GeomColor &color, int na, int nb, int nc, int nd, int textSize, core::scalemode sm=core::interpolateLIN)
 adds text-texture quad -primitive to this object More...
 
void addTextTexture (int a, int b, int c, int d, const std::string &text, const GeomColor &color=GeomColor(255, 255, 255, 255), int textSize=30, core::scalemode sm=core::interpolateLIN)
 convenience method for creation of a text-texture with auto-normals More...
 
ICLGeom_API void addText (int a, const std::string &text, float billboardHeight=10, const GeomColor &color=GeomColor(255, 255, 255, 255), int textRenderSize=30, core::scalemode sm=core::interpolateLIN)
 adds a billboard text-texture attached to given node index a More...
 
void addCustomPrimitive (Primitive *p)
 adds a custom primitive More...
 
SceneObjectaddCube (float x, float y, float z, float d)
 adds a cube child-object with given parameters More...
 
ICLGeom_API SceneObjectaddCuboid (float x, float y, float z, float dx, float dy, float dz)
 adds a cuboid child-object with given parameters More...
 
SceneObjectaddSphere (float x, float y, float z, float r, int rzSteps, int xySlices)
 adds a cuboid child-object with given parameters More...
 
ICLGeom_API SceneObjectaddSpheroid (float x, float y, float z, float rx, float ry, float rz, int rzSteps, int xySlices)
 adds a cuboid child-object with given parameters More...
 
ICLGeom_API SceneObjectaddCylinder (float x, float y, float z, float rx, float ry, float h, int steps)
 adds a cylindical child object with given parameters More...
 
ICLGeom_API SceneObjectaddCone (float x, float y, float z, float rx, float ry, float h, int steps)
 adds a conical child object with given parameters More...
 
ICLGeom_API void setColor (Primitive::Type t, const GeomColor &color, bool recursive=true)
 tints all Primitives with given type in given color More...
 
ICLGeom_API void setPointSize (float pointSize, bool recursive=true)
 sets point size More...
 
ICLGeom_API void setLineWidth (float lineWidth, bool recursive=true)
 sets point size More...
 
virtual void prepareForRendering ()
 called by the renderer before the object is rendered More...
 
virtual void complexCustomRender (icl::geom::ShaderUtil *util)
 this function is called when an object is rendered More...
 
ICLGeom_API void setColorsFromVertices (Primitive::Type t, bool on, bool recursive=true)
 sets how 2D-geom colors are set More...
 
ICLGeom_API bool getSmoothShading () const
 returns wheather smooth shading is activated More...
 
ICLGeom_API void setSmoothShading (bool on, bool recursive=true)
 sets whether to use smoothshading (default is false) More...
 
ICLGeom_API void createAutoNormals (bool smooth=true)
 automatically creates precomputed normals More...
 
ICLGeom_API Hit hit (const ViewRay &v, bool recursive=true)
 returns whether this object is hit by the given viewray More...
 
const Hit hit (const ViewRay &v, bool recursive=true) const
 returns whether this object is hit by the given viewray (const) More...
 
ICLGeom_API std::vector< Hithits (const ViewRay &v, bool recursive=true)
 returns all hits with SceneObjects form the given viewray More...
 
ICLGeom_API std::vector< VecgetTransformedVertices () const
 returns all vertices in their final world coordinates More...
 
ICLGeom_API Vec getClosestVertex (const Vec &pWorld, bool relative=false) throw (utils::ICLException)
 returns the vertex, that is closest to the given point in wold coordinates More...
 
ICLGeom_API void setVisible (bool visible, bool recursive=true)
 sets the visibility of this object More...
 
bool isVisible () const
 returns whether this object is currently visible More...
 
void hide (bool recursive=true)
 calls setVisible(false) More...
 
void show (bool recursive=true)
 calls setVisible(true) More...
 
void setLockingEnabled (bool enabled)
 sets locking enabled or disabled More...
 
bool getLockingEnabled () const
 returns whether locking is current enabled for this object More...
 
virtual void lock () const
 locks the internal mutex if locking enabled is set to true More...
 
virtual void unlock () const
 unlocks the internal mutex if locking enabled is set to true More...
 
void setPointSmoothingEnabled (bool enabled=true)
 sets whether points are visualized in a smoothed manner More...
 
void setLineSmoothingEnabled (bool enabled=true)
 sets whether lines are visualized in a smoothed manner More...
 
void setPolygonSmoothingEnabled (bool enabled=true)
 sets whether faces are visualized in a smoothed manner More...
 
ICLGeom_API void clearAllPrimitives ()
 deletes and removes all primitives More...
 
virtual ICLGeom_API void clearObject (bool deleteAndRemoveChildren=true, bool resetTransform=false)
 deletes all primitive and all vertex, color and normal content (and optionally also the children) More...
 
ICLGeom_API void createDisplayList ()
 creates a displaylist in the next render cycle More...
 
ICLGeom_API void freeDisplayList ()
 frees the displaylist in the next render cycle More...
 
ICLGeom_API void setFragmentShader (qt::GLFragmentShader *shader)
 sets a fragment shader to use for this object More...
 
qt::GLFragmentShadergetFragmentShader ()
 returns the current fragment shader (or NULL if non was given) More...
 
const qt::GLFragmentShadergetFragmentShader () const
 returns the current fragment shader (or NULL if non was given, const version) More...
 
void setCastShadowsEnabled (bool castShadows=true)
 
bool getCastShadowsEnabled ()
 
void setReceiveShadowsEnabled (bool receiveShadows=true)
 
bool getReceiveShadowsEnabled ()
 
void setShininess (icl8u value)
 sets the material shininess (default is 128) More...
 
void setSpecularReflectance (const GeomColor &values)
 sets the materials specular reflectance More...
 
bool getDepthTestEnabled () const
 returns whether depth test is enabled for this object More...
 
void setDepthTestEnabled (bool enabled, bool recursive=true)
 sets whether depth test is enabled for this object More...
 
float getPointHitMaxDistance () const
 returns the maximum distance to a pointing viewraw More...
 
void setPointHitMaxDistance (float d)
 sets the maximum distance to a pointing view-ray More...
 
virtual ICLGeom_API void setTransformation (const Mat &m)
 Sets a transformation matrix. More...
 
ICLGeom_API void removeTransformation ()
 sets the internal transformation to the identity matrix More...
 
virtual ICLGeom_API void transform (const Mat &m)
 multiplies the current transformation matrix by given matrix More...
 
template<class T >
void transform (const T &m)
 utility method for passing arbitrary matrix classes More...
 
virtual ICLGeom_API void rotate (float rx, float ry, float rz, icl::math::AXES axes=icl::math::AXES_DEFAULT)
 rotates the scene object (this affects it's transformation matrix) More...
 
template<class T >
void rotate (const T &t, icl::math::AXES axes=icl::math::AXES_DEFAULT)
 utility wrapper for vector based rotation More...
 
virtual ICLGeom_API void translate (float dx, float dy, float dz)
 translates the scene object (this affects it's translates matrix) More...
 
template<class T >
void translate (const T &t)
 utility wrapper for vector based translation More...
 
virtual ICLGeom_API void scale (float sx, float sy, float sz)
 transformes the current transformation matrix by a scale matrix More...
 
template<class T >
void scale (const T &t)
 utility wrapper for vector based scaling More...
 
ICLGeom_API Mat getTransformation (bool relative=false) const
 returns the current transformation matrix More...
 
ICLGeom_API bool hasTransformation (bool relative=false) const
 returns whether the SceneObject has currently a non-ID-transformation More...
 
ICLGeom_API SceneObjectgetParent ()
 returns the parent scene object More...
 
ICLGeom_API const SceneObjectgetParent () const
 returns the parent scene object (const version) More...
 
ICLGeom_API void addChild (SceneObject *child, bool passOwnerShip=true)
 adds a new child to this scene object More...
 
void addChild (utils::SmartPtr< SceneObject > child)
 directly passes a smart pointer as a child More...
 
ICLGeom_API void removeChild (SceneObject *child)
 removes given child More...
 
ICLGeom_API void removeAllChildren ()
 removes all children More...
 
ICLGeom_API bool hasChildren () const
 returns whether the SceneObject has children at all More...
 
ICLGeom_API int getChildCount () const
 returns the number of children More...
 
ICLGeom_API SceneObjectgetChild (int index)
 returns child at given index More...
 
ICLGeom_API const SceneObjectgetChild (int index) const
 returns child at given index (const) More...
 
utils::SmartPtr< SceneObjectgetChildPtr (int index)
 returns a shared pointer to the child at given index More...
 
ICLGeom_API bool hasChild (const SceneObject *o) const
 returns whether the given object is a child of this one More...
 

Protected Member Functions

template<class T , int N>
core::DataSegment< T, N > & error (const std::string &fname) throw (utils::ICLException)
 internally used utility method that throws verbose exceptions More...
 
core::DataSegmentBaseerror_dyn (const std::string &featureName) throw (utils::ICLException)
 internally used utility method that throws verbose exceptions More...
 
virtual void drawNormalLines ()
 draw normal lines More...
 

Protected Attributes

GeomColor m_defaultPointColor
 default color used to render points that have no color information More...
 
std::map< std::string,
std::string > 
m_metaData
 internal map of meta data More...
 
bool useDrawNormalLines
 
float normalLineLength
 
int normalLineGranularity
 
- Protected Attributes inherited from icl::geom::SceneObject
std::vector< Vecm_vertices
 
std::vector< Vecm_normals
 
std::vector< GeomColorm_vertexColors
 
std::vector< Primitive * > m_primitives
 
std::vector< utils::SmartPtr
< qt::GLImg > > 
m_sharedTextures
 
int m_visibleMask
 
bool m_lineColorsFromVertices
 
bool m_triangleColorsFromVertices
 
bool m_quadColorsFromVertices
 
bool m_polyColorsFromVertices
 
float m_pointSize
 
float m_lineWidth
 
bool m_useSmoothShading
 
bool m_isVisible
 
Mat m_transformation
 for the scene graph implementation More...
 
bool m_hasTransformation
 
SceneObjectm_parent
 
std::vector< utils::SmartPtr
< SceneObject > > 
m_children
 
utils::Mutex m_mutex
 for asynchronous updates More...
 
bool m_enableLocking
 can be enabled More...
 
bool m_pointSmoothingEnabled
 
bool m_lineSmoothingEnabled
 
bool m_polygonSmoothingEnabled
 
bool m_depthTestEnabled
 default is true More...
 
icl8u m_shininess
 
GeomColor m_specularReflectance
 

Private Attributes

utils::Time timestamp
 timestamp associated with the point cloud More...
 

Additional Inherited Members

- Static Public Member Functions inherited from icl::geom::SceneObject
static SceneObjectcube (float x, float y, float z, float r)
 create a cube scene object More...
 
static SceneObjectcuboid (float x, float y, float z, float dx, float dy, float dz)
 create a cuboid scene object More...
 
static SceneObjectsphere (float x, float y, float z, float r, int rzSteps, int xySlices)
 create a shere scene object More...
 
static SceneObjectspheroid (float x, float y, float z, float rx, float ry, float rz, int rzSteps, int xySlices)
 create a shere scene object More...
 
static SceneObjectsuperquadric (float x, float y, float z, float rx, float ry, float rz, float dx, float dy, float dz, float e1, float e2, int rzSteps, int xySlices)
 create a superquadric scene object More...
 
- Static Protected Member Functions inherited from icl::geom::SceneObject
static void collect_hits_recursive (SceneObject *obj, const ViewRay &v, std::vector< Hit > &hits, bool recursive)
 recursive picking method More...
 

Detailed Description

Base class for point cloud data types.

The PointCloudObjectBase class provides a generic but abstract interface for point cloud data types. By inheriting the SceneObject class, it allows for easy visualization as an object in an instance of an icl::Scene. The interface includes querying important, but abstract information about the acutal point cloud, such as it's size or which features are supported. In addition to this, it's select*** methods allow for accessing the internal point feature information in a generic manner.

Member Enumeration Documentation

List of well known features.

Enumerator
Intensity 

scalar components 4 bytes each!

single float intensity

Label 

single int32 label

Depth 

single float depth value (interpretation suggestion: dist to camera center)

BGR 

[uchar b,g,r, padding]

BGRA 

[uchar b,g,r, alpha]

BGRA32s 

bgra packed as one icl32s

XYZ 

[float x,y,z, padding]

XYZH 

[float x,y,z, homogenous part]

Normal 

[float nx,ny,nz,curvature]

RGBA32f 

[float r,g,b,a ]

NUM_FEATURES 

Constructor & Destructor Documentation

icl::geom::PointCloudObjectBase::PointCloudObjectBase ( )
inline

Default constructor.

Enables locking in the wrapped SceneObject class

Member Function Documentation

virtual void icl::geom::PointCloudObjectBase::addFeature ( FeatureType  t)
throw (utils::ICLException
)
inlinevirtual

interface for adding a feature to an existing point cloud instance

if the given feature cannot be added, an exception is thrown. To avoid this, call canAddFeature before using this function. Implementations of this function are supposed ignore this call in cases where the feature is actually already supported

Reimplemented in icl::geom::PointCloudObject.

virtual bool icl::geom::PointCloudObjectBase::canAddFeature ( FeatureType  t) const
inlinevirtual

interface function for dynamic Point cloud types that can dynamically add features

For features that are already supported, the output is undefined

Reimplemented in icl::geom::PointCloudObject.

void icl::geom::PointCloudObjectBase::clearAllMetaData ( )

deletes all meta data entries

void icl::geom::PointCloudObjectBase::clearMetaData ( const std::string &  key)

clears the meta data for a given key

virtual PointCloudObjectBase* icl::geom::PointCloudObjectBase::copy ( ) const
inlinevirtual

deep copy interface (needs to be implemented by subclasses)

Reimplemented from icl::geom::SceneObject.

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >, icl::geom::PointCloudObject, and icl::geom::PointCloudSegment.

virtual void icl::geom::PointCloudObjectBase::customRender ( )
virtual

custom rendering method

The basic implementation of this method uses the XYZ data segment to render points using an OpenGL vertex array. If any color information is available, it is used to tint the drawn points using OpenGL color pointer. Miss-ordered BGR types are rendered using an OpenGL fragment shaded to swap the transferred blue and red channels

Reimplemented from icl::geom::SceneObject.

Reimplemented in icl::geom::PointCloudObject.

virtual void icl::geom::PointCloudObjectBase::deepCopy ( PointCloudObjectBase dst) const
virtual

deeply copies all well-known features that are shared by this and dst

virtual void icl::geom::PointCloudObjectBase::drawNormalLines ( )
protectedvirtual

draw normal lines

virtual bool icl::geom::PointCloudObjectBase::equals ( const PointCloudObjectBase dst,
bool  compareOnlySharedFeatures = false,
bool  allowDifferentColorTypes = true,
float  tollerance = 1.0e-5 
) const
virtual

returns whether two points clouds are equal

template<class T , int N>
core::DataSegment<T,N>& icl::geom::PointCloudObjectBase::error ( const std::string &  fname)
throw (utils::ICLException
)
inlineprotected

internally used utility method that throws verbose exceptions

core::DataSegmentBase& icl::geom::PointCloudObjectBase::error_dyn ( const std::string &  featureName)
throw (utils::ICLException
)
inlineprotected

internally used utility method that throws verbose exceptions

void icl::geom::PointCloudObjectBase::extractColorsToImage ( core::ImgBase image,
bool  withAlpha = false 
) const
throw (utils::ICLException
)

extracts the color information and stores it into the given image

The image size and color format is adapted if necessary

std::vector<std::string> icl::geom::PointCloudObjectBase::getAllMetaDataEntries ( ) const

returns a list of all available meta data entires

virtual GeomColor icl::geom::PointCloudObjectBase::getDefaultVertexColor ( ) const
inlinevirtual

implements the SceneObject's virtual getter function for this feature

Reimplemented from icl::geom::SceneObject.

virtual int icl::geom::PointCloudObjectBase::getDim ( ) const
pure virtual

return the linearily ordered number of point in the point cloud

Implemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

std::map<std::string,std::string>& icl::geom::PointCloudObjectBase::getMetaData ( )

returns the meta data associated with this point cloud object

const std::map<std::string,std::string>& icl::geom::PointCloudObjectBase::getMetaData ( ) const

returns the meta data associated with this point cloud object (const)

const std::string& icl::geom::PointCloudObjectBase::getMetaData ( const std::string &  key) const
throw (utils::ICLException
)

returns the meta data associated with a given key

virtual utils::Size icl::geom::PointCloudObjectBase::getSize ( ) const
throw (utils::ICLException
)
pure virtual

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

Implemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

virtual std::vector<std::string> icl::geom::PointCloudObjectBase::getSupportedDynamicFeatures ( ) const
inlinevirtual

For subclasses that provide Dynamic features, this function must be implemented.

virtual const utils::Time& icl::geom::PointCloudObjectBase::getTime ( ) const
inlinevirtual

returns the current timestamp

bool icl::geom::PointCloudObjectBase::hasAnyMetaData ( ) const

returns whether any meta data is available

bool icl::geom::PointCloudObjectBase::hasMetaData ( const std::string &  key) const

returns whether meta data to the given key is associated

virtual bool icl::geom::PointCloudObjectBase::isOrganized ( ) const
pure virtual

interface for supported features

Implemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

virtual core::DataSegmentBase icl::geom::PointCloudObjectBase::select ( const std::string &  featureName)
inlinevirtual

dynamic feature selection function

This can be implemented in subclasses to grant access to less common feature types such as feature point descriptors

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >.

const core::DataSegmentBase icl::geom::PointCloudObjectBase::select ( const std::string &  featureName) const
inline

const dynamic/custom data

virtual core::DataSegment<icl8u,3> icl::geom::PointCloudObjectBase::selectBGR ( )
inlinevirtual

well known feature Intensity (three byte vectors ordered BGR)

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >.

const core::DataSegment<icl8u,3> icl::geom::PointCloudObjectBase::selectBGR ( ) const
inline

const bgr data

virtual core::DataSegment<icl8u,4> icl::geom::PointCloudObjectBase::selectBGRA ( )
inlinevirtual

well known feature Intensity (four byte vectors ordered BGRA)

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >.

const core::DataSegment<icl8u,4> icl::geom::PointCloudObjectBase::selectBGRA ( ) const
inline

const rgba data

virtual core::DataSegment<icl32s,1> icl::geom::PointCloudObjectBase::selectBGRA32s ( )
inlinevirtual

well known feature Intensity (single int value encoding byte-wise BGRA)

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >.

const core::DataSegment<icl32s,1> icl::geom::PointCloudObjectBase::selectBGRA32s ( ) const
inline

const bgra32s data

virtual core::DataSegment<float,1> icl::geom::PointCloudObjectBase::selectDepth ( )
inlinevirtual

well known feature Depth (single float values)

Reimplemented in icl::geom::PointCloudObject.

const core::DataSegment<float,1> icl::geom::PointCloudObjectBase::selectDepth ( ) const
inline

const intensity data

virtual core::DataSegment<float,1> icl::geom::PointCloudObjectBase::selectIntensity ( )
inlinevirtual

well known feature Intensity (single float values)

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >.

const core::DataSegment<float,1> icl::geom::PointCloudObjectBase::selectIntensity ( ) const
inline

const intensity data

virtual core::DataSegment<icl32s,1> icl::geom::PointCloudObjectBase::selectLabel ( )
inlinevirtual

well known feature Intensity (single 32bit int values)

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

const core::DataSegment<icl32s,1> icl::geom::PointCloudObjectBase::selectLabel ( ) const
inline

const label data

virtual core::DataSegment<float,4> icl::geom::PointCloudObjectBase::selectNormal ( )
inlinevirtual

well known feature Normal (4 float values)

in the PCL, the 4th value is sometimes used to store a local curvature value

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

const core::DataSegment<float,4> icl::geom::PointCloudObjectBase::selectNormal ( ) const
inline

const normals data

virtual core::DataSegment<float,4> icl::geom::PointCloudObjectBase::selectRGBA32f ( )
inlinevirtual

well known feature RGBA (4 float values, ordred RGBA)

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

const core::DataSegment<float,4> icl::geom::PointCloudObjectBase::selectRGBA32f ( ) const
inline

const rgba32f data

virtual core::DataSegment<float,3> icl::geom::PointCloudObjectBase::selectXYZ ( )
inlinevirtual

well know features XYZ (three floats, this feature must usually be available)

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

const core::DataSegment<float,3> icl::geom::PointCloudObjectBase::selectXYZ ( ) const
inline

const xyz data

virtual core::DataSegment<float,4> icl::geom::PointCloudObjectBase::selectXYZH ( )
inlinevirtual

common way to store XYZ-data (4th float define homogeneous part)

Reimplemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

const core::DataSegment<float,4> icl::geom::PointCloudObjectBase::selectXYZH ( ) const
inline

const xyzh data

void icl::geom::PointCloudObjectBase::setColorsFromImage ( const core::ImgBase image)
throw (utils::ICLException
)

tints the point cloud pixel from the given image data

The image size must be equal to the point cloud size

void icl::geom::PointCloudObjectBase::setDefaultVertexColor ( const GeomColor color)

sets the color that is used to render points if color information is available

void icl::geom::PointCloudObjectBase::setDim ( int  dim)
inline

sets the number of contained points (and enables the unorganized mode)

void icl::geom::PointCloudObjectBase::setMetaData ( const std::string &  key,
const std::string &  value 
)

sets the meta data entry for given key to value

virtual void icl::geom::PointCloudObjectBase::setSize ( const utils::Size size)
pure virtual

adapts the 2D size and enables the 'organized mode'

Implementations of this method should ensure, that the function behaves lazy, i.e. if the object has already the desired size, nothing should be done.
Furthermore, if the given height is 0 or smaller, the point-cloud should be set to the un-organized mode

Implemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

virtual void icl::geom::PointCloudObjectBase::setTime ( const utils::Time t)
inlinevirtual

sets the current timestamp

void icl::geom::PointCloudObjectBase::setUseDrawNormalLines ( bool  use,
float  lineLength = 40,
int  granularity = 4 
)

set use draw normal lines

virtual bool icl::geom::PointCloudObjectBase::supports ( FeatureType  t) const
pure virtual

interface for supported features

Implemented in icl::geom::PCLPointCloudObject< PCLPointType >, and icl::geom::PointCloudObject.

Member Data Documentation

GeomColor icl::geom::PointCloudObjectBase::m_defaultPointColor
protected

default color used to render points that have no color information

std::map<std::string,std::string> icl::geom::PointCloudObjectBase::m_metaData
protected

internal map of meta data

int icl::geom::PointCloudObjectBase::normalLineGranularity
protected
float icl::geom::PointCloudObjectBase::normalLineLength
protected
utils::Time icl::geom::PointCloudObjectBase::timestamp
private

timestamp associated with the point cloud

bool icl::geom::PointCloudObjectBase::useDrawNormalLines
protected

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