Debian Codegraph @

plugins/core/Standard/qPCL/PclUtils/utils/cc2sm.h

raw symbols SCIP
1 //##########################################################################
2 //# #
3 //# CLOUDCOMPARE PLUGIN: qPCL #
4 //# #
5 //# This program is free software; you can redistribute it and/or modify #
6 //# it under the terms of the GNU General Public License as published by #
7 //# the Free Software Foundation; version 2 or later of the License. #
8 //# #
9 //# This program is distributed in the hope that it will be useful, #
10 //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
11 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
12 //# GNU General Public License for more details. #
13 //# #
14 //# COPYRIGHT: Luca Penasa #
15 //# #
16 //##########################################################################
17 //
18 #ifndef Q_PCL_PLUGIN_CC2SM_H
19 #define Q_PCL_PLUGIN_CC2SM_H
20
21 //Local
22 #include "PCLCloud.h"
23
24 //PCL
25 #include <pcl/point_cloud.h>
26 #include <pcl/point_types.h>
27
28 //Qt
29 #include <QStringList>
30
31 //system
32 #include <set>
33 #include <string>
34
35 class ccPointCloud;
36
37 //! CC to PCL cloud converter
38 class cc2smReader
39 {
40 public:
41 explicit cc2smReader(ccPointCloud* ccCloud);
42
43 //! Converts the ccPointCloud to a pcl::PointCloud2 cloud
44 /** This is useful for saving a ccPointCloud into a PCD file.
45 For pcl filters other methods are suggested (to get only the necessary bits of data)
46 **/
47 PCLCloud::Ptr getAsSM() const;
48 PCLCloud::Ptr getAsSM(bool xyz, bool normals, bool rgbColors, const QStringList& scalarFields) const;
49
50 //! Converts the ccPointCloud to a 'pcl::PointXYZ' cloud
51 pcl::PointCloud<pcl::PointXYZ>::Ptr getRawXYZ() const;
52
53 //! Converts the ccPointCloud to a 'pcl::PointNormal' cloud
54 pcl::PointCloud<pcl::PointNormal>::Ptr getAsPointNormal() const;
55
56 static std::string GetSimplifiedSFName(const QString& ccSfName);
57
58 protected:
59
60 PCLCloud::Ptr getXYZ() const;
61 PCLCloud::Ptr getNormals() const;
62 PCLCloud::Ptr getColors() const;
63 PCLCloud::Ptr getFloatScalarField(const QString& sfName) const;
64
65 //! Associated cloud
66 const ccPointCloud* m_ccCloud;
67 };
68
69 #endif // Q_PCL_PLUGIN_CC2SM_H