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

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. More...
 
- 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. More...
 

Protected Member Functions

 ~PCLBaseObject () override
 Destructor, usually called automatically when the last RefCountedBase reference is removed. More...
 
- Protected Member Functions inherited from ml::RefCountedBase
 ~RefCountedBase () override
 Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h. More...
 
- 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. More...
 
- Protected Member Functions inherited from ml::Base
virtual char * getPersistentState () const
 Returns a C string describing the object's internal state. More...
 
virtual void setPersistentState (const char *)
 Restores the object's internal state from a string that had been previously generated using getPersistentState(). More...
 
virtual void clearPersistentState (char *) const
 Disposes a string previously allocated by getPersistentState(). More...
 

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. More...
 

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.

Referenced by ml::PCLModule::setOutputPCLObject().

◆ 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: