MeVisLab Toolbox Reference
mlPCLBaseObject.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code author="Wolf Spindler"
3 //----------------------------------------------------------------------------------
7 
16 //----------------------------------------------------------------------------------
17 #pragma once
18 
19 #include "MLPCLSupportSystem.h"
20 #include <mlModuleIncludes.h>
23 #include <pcl/pcl_base.h>
24 #include <pcl/PointIndices.h>
26 
27 ML_START_NAMESPACE
28 
29 //----------------------------------------------------------------------------------
33 //----------------------------------------------------------------------------------
35 {
36 public:
39 
41  PCLBaseObject(MLPCLObjectPtrsContainer newPCLObjectPtrsContainer);
42 
45 
48 
50  void setPCLObjectPtrsContainer(const MLPCLObjectPtrsContainer &newPointCloudsStruct);
51 
54 
57 
60 
62  void setPointIndices(const std::vector<int> &indices=std::vector<int>());
63 
65  void setPointIndices(pcl::IndicesConstPtr indicesPtr);
66 
68  void setPointIndices(pcl::IndicesPtr indicesPtr);
69 
72  void getComposedIndices(pcl::PointIndices &composedIndices) const;
73 
74 protected:
76  ~PCLBaseObject() override;
77 
78 private:
81  MLPCLObjectPtrsContainer _pclPtrs;
82 
84  MLPCLPointIndexVector _pointIndexVector;
85 
88 
91 
92 public:
98  static void _checkRuntimeInterfaceResults(const RuntimeType* classTypeId,
99  const RuntimeType* typeId,
100  const char* typeIdName,
101  bool alsoCallDestroyClass);
102 
103 };
104 
107 
108 ML_END_NAMESPACE
109 
Project global and OS specific declarations.
#define MLPCLSUPPORT_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Disables warnings from PCL headers which otherwise cannot be avoided.
Restores disabled warnings from PCL headers which otherwise cannot be avoided.
Base object containing pointers (as MLPCLObjectPtrsContainer) to objects from the Point Cloud Library...
void setPCLObjectPtrsContainer(const MLPCLObjectPtrsContainer &newPointCloudsStruct)
Sets the internal MLPCLObjectPtrsContainer container to newPointCloudsStruct.
const MLPCLObjectPtrsContainer & getConstPCLObjectPtrsContainer() const
Returns the non modifiable currently set structure of point cloud pointers.
MLPCLObjectPtrsContainer & getPCLObjectPtrsContainer()
Returns the internal MLPCLObjectPtrsContainer container as modifiable object to get access to the poi...
MLPCLPointIndexVector & getPointIndexVector()
Get the reference to the freely accessible vector of point indexes if the algorithm produces them.
void setPointIndices(pcl::IndicesPtr indicesPtr)
Clears getPointIndexVector(); if indicesPtr is valid then it appends a copy of *indices (for non cons...
void getComposedIndices(pcl::PointIndices &composedIndices) const
Clear composedIndices.indices and append all PointIndices from getPointIndexVector() to it.
PCLBaseObject()
Construct a base object where all pointers in the internal MLPCLObjectPtrsContainer container are set...
void setPointIndices(const std::vector< int > &indices=std::vector< int >())
Clears getPointIndexVector() and appends a copy of indices.
~PCLBaseObject() override
Destructor, usually called automatically when the last RefCountedBase reference is removed.
void setPointIndices(pcl::IndicesConstPtr indicesPtr)
Clears getPointIndexVector(); if indicesPtr is valid then it appends a copy of *indices (for constant...
bool hasValidPointCloudPointer() const
Returns true if any point cloud pointers in the internal MLPCLObjectPtrsContainer container is non nu...
PCLBaseObject(MLPCLObjectPtrsContainer newPCLObjectPtrsContainer)
Construct a base object where a copy of newPointCloudsStruct is stored in the internal MLPCLObjectPtr...
const MLPCLPointIndexVector & getPointIndexVector() const
Get the reference to the constant vector of point indexes if the algorithm produces them.
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(),...
RefCountedBase class adds intrusive reference counting support to the Base class.
RuntimeType contains type and inheritance information of a class and a static dictionary with informa...
Definition: mlRuntimeType.h:53
A container with pointers from the PCL (Point Cloud Library) passed in BaseObjects between PCL module...
#define ML_PCL_TEST_INTERFACE_NO_OVERRIDE(BASE_OBJECT_NAME)
Implements a dedicated interface for PCL related modules which is required in automatic tests.
#define ML_REFCOUNTED_PTR(CLASSNAME)
Macro that defines convenience Ptr/ConstPtr typedefs to be used instead of intrusive_ptr templates.
#define ML_CLASS_HEADER(className)
Same like ML_CLASS_HEADER_EXPORTED with a non existing export symbol.
std::vector< pcl::PointIndices > MLPCLPointIndexVector
Vector of point indexes which are generated by a number of algorithms.
Definition: mlPCLTypes.h:77
A container with pointers from the PCL (Point Cloud Library) passed in BaseObjects between PCL module...