Embedding PCL Viewer on a Qt GUI Main Window

前端 未结 2 2073
再見小時候
再見小時候 2021-01-01 02:19

I am trying to develop a user interface using QtCreator on a Windows 7 64-bit machine. This user interface will be deployed on a 32-bit Windows 7 machine, and will control a

2条回答
  •  长情又很酷
    2021-01-01 02:44

    You can simply use PCL's PCLVisualizer, which is extensively described here, via the QVTKWidget. This is the setup I'm currently running. So you would end up doing something along the lines of the following (pseudo-)code:

    In your header:

    class PointCloudWidget : public QVTKWidget
    {
        //Whatever comes before (constructor, methods, etc.)
    
    private:
    
        pcl::visualization::PCLVisualizer m_visualizer;
    };
    

    And in your cpp:

    PointCloudWidget::PointCloudWidget(QWidget *parent) : QVTKWidget(parent)
    {
        this->SetRenderWindow(m_visualizer.getRenderWindow());
    }
    

    You can then use the visualizer to achieve the same functionality as the PCL viewer has.

提交回复
热议问题