MeVisLab Toolbox 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>
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... | |
MLPCLObjectPtrsContainer & | getPCLObjectPtrsContainer () |
Returns the internal MLPCLObjectPtrsContainer container as modifiable object to get access to the point cloud pointers. More... | |
const MLPCLObjectPtrsContainer & | getConstPCLObjectPtrsContainer () 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... | |
MLPCLPointIndexVector & | getPointIndexVector () |
Get the reference to the freely accessible vector of point indexes if the algorithm produces them. More... | |
const MLPCLPointIndexVector & | getPointIndexVector () 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... | |
![]() | |
RefCountedBase () | |
Constructor. More... | |
RefCountedBase (const RefCountedBase &) | |
Explicit copy constructor. More... | |
virtual void | incRefCount () const |
Increases the reference count. More... | |
virtual void | decRefCount () const |
Decreases the reference count (object will be deleted if the reference count is decremented to 0). More... | |
bool | isRefCountedBase () const override |
Returns whether the instance is derived from RefCountedBase. More... | |
![]() | |
EventSource () | |
EventSource (const EventSource &evSource) | |
~EventSource () override | |
void | addEventListener (BaseEventCallback *cb, void *userData) |
Adds event listener callback to this Base object. More... | |
void | removeEventListener (BaseEventCallback *cb, void *userData) |
Removes event listener callback from this Base object. More... | |
bool | hasEventListeners () const |
Checks whether 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... | |
![]() | |
Base () | |
Constructor. More... | |
virtual | ~Base () |
Destructor. More... | |
virtual Base * | deepCopy () const |
Creates a deep copy of the given object. More... | |
bool | isOfAllowedType (const std::vector< const RuntimeType * > &types) const |
Checks whether this object's type is equal to or derived from one of the types given in the argument. More... | |
virtual std::string | detailString () const |
Returns 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 |
Writes the objects state to the data stream object. More... | |
virtual void | readFrom (AbstractPersistenceInputStream *, int) |
Reads 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 void | updateReferenceCountingIfSupported (Base *oldValue, Base *newValue, bool &isRefCountedBase) |
Helper method that handles incrementing/decrementing of the reference count if base instances support it. More... | |
Protected Member Functions | |
~PCLBaseObject () override | |
Destructor, usually called automatically when the last RefCountedBase reference is removed. More... | |
![]() | |
~RefCountedBase () override | |
Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h. More... | |
![]() | |
void | sendEvent (BaseEvent *event, void *skipListener=nullptr) |
Macro for the declaration of the runtime type system methods, defined in mlRuntimeSubClass.h. More... | |
Additional Inherited Members | |
![]() | |
enum | PersistenceInterface { PersistenceByString , PersistenceByTreeNode , PersistenceByStream } |
This enum describes the different persistence interfaces available. More... | |
![]() | |
std::atomic_int_least32_t | _refCount |
Reference count. More... | |
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.
ml::PCLBaseObject::PCLBaseObject | ( | ) |
Construct a base object where all pointers in the internal MLPCLObjectPtrsContainer container are set to nullptr.
ml::PCLBaseObject::PCLBaseObject | ( | MLPCLObjectPtrsContainer | newPCLObjectPtrsContainer | ) |
Construct a base object where a copy of newPointCloudsStruct
is stored in the internal MLPCLObjectPtrsContainer container.
|
overrideprotected |
Destructor, usually called automatically when the last RefCountedBase reference is removed.
|
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!
void ml::PCLBaseObject::getComposedIndices | ( | pcl::PointIndices & | composedIndices | ) | const |
Clear composedIndices.indices and append all PointIndices from getPointIndexVector() to it.
composedIndices.header is left unchanged.
const MLPCLObjectPtrsContainer& ml::PCLBaseObject::getConstPCLObjectPtrsContainer | ( | ) | const |
Returns the non modifiable currently set structure of point cloud pointers.
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().
MLPCLPointIndexVector& ml::PCLBaseObject::getPointIndexVector | ( | ) |
Get the reference to the freely accessible vector of point indexes if the algorithm produces them.
const MLPCLPointIndexVector& ml::PCLBaseObject::getPointIndexVector | ( | ) | const |
Get the reference to the constant vector of point indexes if the algorithm produces them.
bool ml::PCLBaseObject::hasValidPointCloudPointer | ( | ) | const |
Returns true if any point cloud pointers in the internal MLPCLObjectPtrsContainer container is non nullptr, otherwise it returns false.
void ml::PCLBaseObject::setPCLObjectPtrsContainer | ( | const MLPCLObjectPtrsContainer & | newPointCloudsStruct | ) |
Sets the internal MLPCLObjectPtrsContainer container to newPointCloudsStruct.
void ml::PCLBaseObject::setPointIndices | ( | const std::vector< int > & | indices = std::vector< int >() | ) |
Clears getPointIndexVector() and appends a copy of indices.
void ml::PCLBaseObject::setPointIndices | ( | pcl::IndicesConstPtr | indicesPtr | ) |
Clears getPointIndexVector(); if indicesPtr is valid then it appends a copy of *indices (for constant ptr).
void ml::PCLBaseObject::setPointIndices | ( | pcl::IndicesPtr | indicesPtr | ) |
Clears getPointIndexVector(); if indicesPtr is valid then it appends a copy of *indices (for non constant ptr).