MeVisLab Toolbox Reference
ml::PCLBaseObject Class Reference

Base object containing pointers (as MLPCLObjectPtrsContainer) to objects from the Point Cloud Library (PCL) as well as a vector of PointIndices and to pass point clouds and result indexes from one module to another. More...

#include <mlPCLBaseObject.h>

Inheritance diagram for ml::PCLBaseObject:
ml::RefCountedBase ml::EventSource ml::Base

Public Member Functions

 PCLBaseObject ()
 Construct a base object where all pointers in the internal MLPCLObjectPtrsContainer container are set to nullptr.
 
 PCLBaseObject (MLPCLObjectPtrsContainer newPCLObjectPtrsContainer)
 Construct a base object where a copy of newPointCloudsStruct is stored in the internal MLPCLObjectPtrsContainer container.
 
MLPCLObjectPtrsContainergetPCLObjectPtrsContainer ()
 Returns the internal MLPCLObjectPtrsContainer container as modifiable object to get access to the point cloud pointers.
 
const MLPCLObjectPtrsContainergetConstPCLObjectPtrsContainer () const
 Returns the non modifiable currently set structure of point cloud pointers.
 
void setPCLObjectPtrsContainer (const MLPCLObjectPtrsContainer &newPointCloudsStruct)
 Sets the internal MLPCLObjectPtrsContainer container to newPointCloudsStruct.
 
bool hasValidPointCloudPointer () const
 Returns true if any point cloud pointers in the internal MLPCLObjectPtrsContainer container is non nullptr, otherwise it returns false.
 
MLPCLPointIndexVectorgetPointIndexVector ()
 Get the reference to the freely accessible vector of point indexes if the algorithm produces them.
 
const MLPCLPointIndexVectorgetPointIndexVector () const
 Get the reference to the constant vector of point indexes if the algorithm produces them.
 
void setPointIndices (const std::vector< int > &indices=std::vector< int >())
 Clears getPointIndexVector() and appends a copy of indices.
 
void setPointIndices (pcl::IndicesConstPtr indicesPtr)
 Clears getPointIndexVector(); if indicesPtr is valid then it appends a copy of *indices (for constant ptr).
 
void setPointIndices (pcl::IndicesPtr indicesPtr)
 Clears getPointIndexVector(); if indicesPtr is valid then it appends a copy of *indices (for non constant ptr).
 
void getComposedIndices (pcl::PointIndices &composedIndices) const
 Clear composedIndices.indices and append all PointIndices from getPointIndexVector() to it.
 
- Public Member Functions inherited from ml::RefCountedBase
 RefCountedBase ()
 Constructor.
 
 RefCountedBase (const RefCountedBase &)
 Explicit copy constructor.
 
virtual void incRefCount () const
 Increase reference count.
 
virtual void decRefCount () const
 Decrease ref count (object will be deleted if ref count is decremented to 0)
 
bool isRefCountedBase () const override
 Returns if the instance is derived from RefCountedBase.
 
- Public Member Functions inherited from ml::EventSource
 EventSource ()
 
 EventSource (const EventSource &evSource)
 
 ~EventSource () override
 
void addEventListener (BaseEventCallback *cb, void *userData)
 add event listener callback to this Base object - the userData will be the first argument when the callback is called
 
void removeEventListener (BaseEventCallback *cb, void *userData)
 remove event listener callback from this Base object - arguments must be the same as for the addEventListener call
 
bool hasEventListeners () const
 check if any event listeners have been added to this Base object; this can be used to skip the sendEvent call (and the potentially expensive building of the event object) altogether
 
- Public Member Functions inherited from ml::Base
 Base ()
 Constructor.
 
virtual ~Base ()
 Destructor.
 
virtual BasedeepCopy () const
 Set addStateToTree version number that can be accessed via getAddStateVersion()
 
bool isOfAllowedType (const std::vector< const RuntimeType * > &types) const
 Check if this object's type is equal to or derived from one of the types given in the argument.
 
virtual std::string detailString () const
 Return a string describing this object.
 
virtual bool implementsPersistence (PersistenceInterface) const
 Override this method to declare which persistence interfaces are implemented by your derived class.
 
virtual std::string persistentState () const
 Returns a string describing the object's internal state.
 
virtual void setPersistentState (const std::string &state)
 Restores the object's internal state from a string that had been previously generated using persistentState().
 
virtual void addStateToTree (TreeNode *) const
 Attaches the object state as children of the given parent node.
 
virtual void readStateFromTree (TreeNode *)
 Reads the object state from the children of the given parent node.
 
virtual void writeTo (AbstractPersistenceOutputStream *) const
 Write the objects state to the data stream object.
 
virtual void readFrom (AbstractPersistenceInputStream *, int)
 Read the objects state from the data stream object.
 

Static Public Member Functions

static void _checkRuntimeInterfaceResults (const RuntimeType *classTypeId, const RuntimeType *typeId, const char *typeIdName, bool alsoCallDestroyClass)
 Helper function for tests which checks the return values getClassTypeId(), getTypeId(), and getTypeIdName() from a module instance to be tested.
 
- Static Public Member Functions inherited from ml::RefCountedBase
static void updateReferenceCountingIfSupported (Base *oldValue, Base *newValue, bool &isRefCountedBase)
 Helper method that handles inc/dec of ref count if base instances support it.
 

Protected Member Functions

 ~PCLBaseObject () override
 Destructor, usually called automatically when the last RefCountedBase reference is removed.
 
- Protected Member Functions inherited from ml::RefCountedBase
 ~RefCountedBase () override
 Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h.
 
- Protected Member Functions inherited from ml::EventSource
void sendEvent (BaseEvent *event, void *skipListener=nullptr)
 Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h.
 

Additional Inherited Members

- Public Types inherited from ml::Base
enum  PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream }
 This enum describes the different persistence interfaces available. More...
 
- Protected Attributes inherited from ml::RefCountedBase
MLint32 _refCount
 Reference count.
 

Detailed Description

Base object containing pointers (as MLPCLObjectPtrsContainer) to objects from the Point Cloud Library (PCL) as well as a vector of PointIndices and to pass point clouds and result indexes from one module to another.

Definition at line 34 of file mlPCLBaseObject.h.

Constructor & Destructor Documentation

◆ PCLBaseObject() [1/2]

ml::PCLBaseObject::PCLBaseObject ( )

Construct a base object where all pointers in the internal MLPCLObjectPtrsContainer container are set to nullptr.

◆ PCLBaseObject() [2/2]

ml::PCLBaseObject::PCLBaseObject ( MLPCLObjectPtrsContainer newPCLObjectPtrsContainer)

Construct a base object where a copy of newPointCloudsStruct is stored in the internal MLPCLObjectPtrsContainer container.

◆ ~PCLBaseObject()

ml::PCLBaseObject::~PCLBaseObject ( )
overrideprotected

Destructor, usually called automatically when the last RefCountedBase reference is removed.

Member Function Documentation

◆ _checkRuntimeInterfaceResults()

static void ml::PCLBaseObject::_checkRuntimeInterfaceResults ( const RuntimeType * classTypeId,
const RuntimeType * typeId,
const char * typeIdName,
bool alsoCallDestroyClass )
static

Helper function for tests which checks the return values getClassTypeId(), getTypeId(), and getTypeIdName() from a module instance to be tested.

If alsoCallDestroyClass is true the the corresponding runtime type is also deleted from the RuntimeType system which makes the module type unusable. If alsoCallDestroyClass is false only checks are performed on the passed pointers. This function is only to be used in test internals, it is no publicly usable function!

◆ getComposedIndices()

void ml::PCLBaseObject::getComposedIndices ( pcl::PointIndices & composedIndices) const

Clear composedIndices.indices and append all PointIndices from getPointIndexVector() to it.

composedIndices.header is left unchanged.

◆ getConstPCLObjectPtrsContainer()

const MLPCLObjectPtrsContainer & ml::PCLBaseObject::getConstPCLObjectPtrsContainer ( ) const

Returns the non modifiable currently set structure of point cloud pointers.

◆ getPCLObjectPtrsContainer()

MLPCLObjectPtrsContainer & ml::PCLBaseObject::getPCLObjectPtrsContainer ( )

Returns the internal MLPCLObjectPtrsContainer container as modifiable object to get access to the point cloud pointers.

◆ getPointIndexVector() [1/2]

MLPCLPointIndexVector & ml::PCLBaseObject::getPointIndexVector ( )

Get the reference to the freely accessible vector of point indexes if the algorithm produces them.

◆ getPointIndexVector() [2/2]

const MLPCLPointIndexVector & ml::PCLBaseObject::getPointIndexVector ( ) const

Get the reference to the constant vector of point indexes if the algorithm produces them.

◆ hasValidPointCloudPointer()

bool ml::PCLBaseObject::hasValidPointCloudPointer ( ) const

Returns true if any point cloud pointers in the internal MLPCLObjectPtrsContainer container is non nullptr, otherwise it returns false.

◆ setPCLObjectPtrsContainer()

void ml::PCLBaseObject::setPCLObjectPtrsContainer ( const MLPCLObjectPtrsContainer & newPointCloudsStruct)

Sets the internal MLPCLObjectPtrsContainer container to newPointCloudsStruct.

◆ setPointIndices() [1/3]

void ml::PCLBaseObject::setPointIndices ( const std::vector< int > & indices = std::vector< int >())

Clears getPointIndexVector() and appends a copy of indices.

◆ setPointIndices() [2/3]

void ml::PCLBaseObject::setPointIndices ( pcl::IndicesConstPtr indicesPtr)

Clears getPointIndexVector(); if indicesPtr is valid then it appends a copy of *indices (for constant ptr).

◆ setPointIndices() [3/3]

void ml::PCLBaseObject::setPointIndices ( pcl::IndicesPtr indicesPtr)

Clears getPointIndexVector(); if indicesPtr is valid then it appends a copy of *indices (for non constant ptr).


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