I'm new from using the PCL (Point Cloud Library). I try to declare a point cloud in QT object class in private, like this:
class pcl_sys : public QThread
{
Q_OBJECT
public:
explicit pcl_sys();
~pcl_sys();
void stop();
bool load_pcd_file(int type);
signals:
public slots:
protected:
void run();
private:
pcl::PointCloud<pcl::PointXYZ>::Ptr *cloud_test;
};
Then I new the point cloud when I opened up the program:
pcl_sys::pcl_sys()
{
cloud_test=0;
cloud_test= new pcl::PointCloud<pcl::PointXYZ>::Ptr (new pcl::PointCloud<pcl::PointXYZ>);
}
but when i try to clear the points when I try to load a file, QT give me an error shows that points is not belong to template cloud_test.
bool pcl_sys::load_pcd_file(int choice)
{
cloud_test->points.clear();
}
How do I fix this issue? Thank you very much.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…