MeVisLab Toolbox Reference
mlPCLBaseObjectWrapper.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code author="Wolf Spindler"
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11
12#ifndef __mlPCLBaseObjectWrapper_H
13#define __mlPCLBaseObjectWrapper_H
14
15#include <FMEThirdPartyWarningsDisable.h>
16#include <QObject>
17#include <Base/mlabCoreServices.h>
18#include <FMEThirdPartyWarningsRestore.h>
19#include "mlPCLBaseObject.h"
20
21// Forward to internally used helper class.
23
24//----------------------------------------------------------------------------------
27//----------------------------------------------------------------------------------
28class MLPCLBaseObjectWrapper : public QObject
29{
31
32public:
34 MLPCLBaseObjectWrapper(ML_NAMESPACE::PCLBaseObject* pclBaseObject);
35
38
39public slots:
41
43 size_t getPCLMajorVersion() const;
44
46 size_t getPCLMinorVersion() const;
47
49 size_t getPCLRevisionVersion() const;
50
53
56
59
62
64 bool isXYZPointCloud() const;
65
68
71
74
76 bool isPolygonMesh() const;
77
80
83
86
89
92
95
98
100 size_t getNumberOfPoints() const;
101
103 size_t getWidth() const;
104
106 size_t getHeight() const;
107
109 bool getIsDense() const;
110
112 bool getIsOrganized() const;
113
117
120 float getIntensityReplacement(size_t idx) const;
122
125 float getPointMemberX (size_t idx) const;
126 float getPointMemberY (size_t idx) const;
127 float getPointMemberZ (size_t idx) const;
128 float getPointMemberNormalX (size_t idx) const;
129 float getPointMemberNormalY (size_t idx) const;
130 float getPointMemberNormalZ (size_t idx) const;
131 float getPointMemberCurvature (size_t idx) const;
132 float getPointMemberRGBAAsFloat(size_t idx) const;
133 float getPointMemberIntensity (size_t idx) const;
137
141 void setPointMemberXYZ (size_t idx, float x, float y, float z);
142 void setPointMemberXYZIntensityReplacement(size_t idx, float x, float y, float z, float val);
143 void setPointMemberNormalXYZ (size_t idx, float x, float y, float z);
145
150
153 void setPointMemberX (size_t idx, float val);
154 void setPointMemberY (size_t idx, float val);
155 void setPointMemberZ (size_t idx, float val);
156 void setPointMemberNormalX (size_t idx, float val);
157 void setPointMemberNormalY (size_t idx, float val);
158 void setPointMemberNormalZ (size_t idx, float val);
159 void setPointMemberCurvature (size_t idx, float val);
160 void setPointMemberIntensity (size_t idx, float val);
161 void setPointMemberRGBAAsFloat(size_t idx, float val);
163 void setPointMemberLabel (size_t idx, quint32 val);
165
170
173
176
179
183
186
188 int getIndex(size_t idxVecIdx, size_t idx) const;
189
191 void setIndex(size_t idxVecIdx, size_t idx, int newVal);
192
196
197private:
199 ml::PCLBaseObject* _pclBaseObject;
200
203
205 void _updateTypedWrapper();
206};
207
208#endif
209
This class is an object wrapper for MultiFileVolume objects for Python.
void setPointMemberNormalY(size_t idx, float val)
void setPointMemberCurvature(size_t idx, float val)
quint32 getPointMemberLabel(size_t idx) const
void resizePointCloud(size_t newNumEntries)
Resizes the point cloud to newNumEntries number of points.
void setPointMemberZ(size_t idx, float val)
void setPointMemberRGBAAsInt(size_t idx, quint32 val)
void setPointMemberXYZIntensityReplacement(size_t idx, float x, float y, float z, float val)
void setPointMemberX(size_t idx, float val)
void createEmptyXYZINormalPointCloud()
Clears any object and creates an empty XYZINormal point cloud.
void setPointMemberY(size_t idx, float val)
void clearPCLObjectPointers()
Frees the actual pcl object if there is any.
void setIndexSet(size_t idxVecIdx, PyObject *idxSet)
Set the nthIndexSet to the numpy array newIdxSet; idxVecIdx accesses out of range will except.
size_t getPCLRevisionVersion() const
Returns the revision of the PCL version.
float getPointMemberNormalZ(size_t idx) const
size_t getPCLMinorVersion() const
Returns the minor PCL version.
float getPointMemberIntensity(size_t idx) const
size_t getNumberOfIndexSetsInIndexVector() const
bool hasValidPolygonMeshPointer() const
Returns whether the PCL base object contains a valid polygon mesh.
void createEmptyPolygonMesh()
Clears any object and creates an empty polygon mesh.
void createEmptyXYZPointCloud()
Clears any object and creates an empty XYZ point cloud.
bool hasValidPCLObjectPointer() const
Returns whether the PCL base object contains any valid pcl object mesh.
void setPointMemberXYZIntensityReplacement(PyObject *x, PyObject *y, PyObject *z, PyObject *val)
size_t getHeight() const
Returns the height member of the point cloud.
bool getIsOrganized() const
Returns the return value of isOrganized member function of the point cloud.
bool hasValidPointCloudPointer() const
Returns whether the PCL base object contains a valid point cloud.
void createEmptyXYZRGBNormalPointCloud()
Clears any object and creates an empty XYZRGBNormal point cloud.
QString getPCLVersionString() const
Returns the PCL version string, for example "1.8.0" or "1.12.1".
bool isXYZINormalPointCloud() const
Returns true if the point cloud is a XYZINormal point cloud, otherwise false.
bool isXYZLNormalPointCloud() const
Returns true if the point cloud is a XYZLNormal point cloud, otherwise false.
size_t getNumberOfIndicesInNthIndexVector(size_t nthIndexSet) const
Returns the number indices in the nthIndexSet index set of the vector of index sets; accesses out of ...
bool isXYZRGBNormalPointCloud() const
Returns true if the point cloud is a XYZRGBNormal point cloud, otherwise false.
size_t getNumberOfPoints() const
Returns the number of points of the point cloud.
int getIndex(size_t idxVecIdx, size_t idx) const
Returns index idx in nth entry of vector of index; accesses out of range will except.
void setPointMemberXYZ(size_t idx, float x, float y, float z)
void setIndex(size_t idxVecIdx, size_t idx, int newVal)
Set index idx in nth entry of vector of index vectors to newVal; accesses out of range will except.
float getPointMemberRGBAAsFloat(size_t idx) const
float getPointMemberX(size_t idx) const
~MLPCLBaseObjectWrapper() override
\script Destructor.
void clearVectorOfIndexVectors()
Clear entire vector of index vectors to have 0 entries.
float getPointMemberNormalX(size_t idx) const
void resizeVectorOfIndexVectors(size_t numIndexVectors)
Resize vector of index vectors to have numIndexVectors entries; resize is performed as std::vector re...
size_t getNumberOfComposedIndices() const
Return number of total indices in all index sets in the vector of index sets.
void setPointMemberNormalXYZ(size_t idx, float x, float y, float z)
float getIntensityReplacement(size_t idx) const
Returns the point member value which is the most appropriate to be considered as intensity; if no app...
size_t getWidth() const
Returns the width member of the point cloud.
void createEmptyXYZLNormalPointCloud()
Clears any object and creates an empty XYZLNormal point cloud.
void setPointMemberLabel(size_t idx, quint32 val)
float getPointMemberCurvature(size_t idx) const
void setPointMemberNormalX(size_t idx, float val)
float getPointMemberZ(size_t idx) const
void setPointMemberNormalZ(size_t idx, float val)
size_t getPCLMajorVersion() const
\script
bool isXYZPointCloud() const
Returns true if the point cloud is a XYZ point cloud, otherwise false.
void setIntensityReplacement(size_t idx, float replVal)
Sets the point member value to repl which is the most appropriate to be considered as intensity; if n...
quint32 getPointMemberRGBAAsInt(size_t idx) const
float getPointMemberY(size_t idx) const
MLPCLBaseObjectWrapper(ml::PCLBaseObject *pclBaseObject)
\script Constructor.
bool getIsDense() const
Returns the is_dense member of the point cloud.
bool isPolygonMesh() const
Returns true if the object in the wrapper is a polygon mesh, otherwise false.
void setPointMemberIntensity(size_t idx, float val)
void resizeNthVectorOfIndexVectors(size_t nthIndexSet, size_t numIndices)
Resize nth entry of vector of index vectors to have numIndices entries; resize is performed as std::v...
void setPointMemberRGBAAsFloat(size_t idx, float val)
float getPointMemberNormalY(size_t idx) const
Base object containing pointers (as MLPCLObjectPtrsContainer) to objects from the Point Cloud Library...
Base object containing pointers (as MLPCLObjectPtrsContainer) to objects from the Point Cloud Library...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.