当前位置: 首页 > news >正文

浙江省杭州市建设厅网站如何创建个人网站免费

浙江省杭州市建设厅网站,如何创建个人网站免费,招标网官网登录,宁夏网站建设电话准备工作: 安装VS2022:这个比较简单,网上随便找个教程就行 安装QT并为VS2022添加QT Creater插件:VS2022配置Qt6_vs2022 qt6-CSDN博客 安装PCL:vs2022配置pcl1.13.1_pcl配置-CSDN博客 安装PCL过程中本身也会安装VTK&…

准备工作:

安装VS2022:这个比较简单,网上随便找个教程就行

安装QT并为VS2022添加QT Creater插件:VS2022配置Qt6_vs2022 qt6-CSDN博客

安装PCL:vs2022配置pcl1.13.1_pcl配置-CSDN博客 安装PCL过程中本身也会安装VTK,但是这个VTK是个丐版,所以就需要下载VTK的源码编译后对PCL中的VTK进行补充

下载CMAKE-gui:(版本最好是最新)不然后面生成boost相关会报错 CMake

下载VTK:在 VTK官网 中下载VTK9.2.0待编译源码,解压后在路径Documentation/dev/bulid.md中可以看到官方提供的Prerequisites以及简易教程

编译VTK9.2:

1、VTK下载完成后解压,然后用Cmake-gui打开;新建个文件夹VTK_QT装生成后的文件,在VTK_QT中新建一个build文件夹作为安装目录

 2、点击【Add Entry】按钮添加缓存变量 CMAKE_DEBUG_POSTFIX,类型为 STRING,值设置为 -gd。这样一次性就可以把release和debug分开生成。

3、单击【Configure】进行配置,根据安装的 VS2022 对应版本的生成器,选择 x64 平台。然后开始配置。配置过程中,cmake 会检测当前环境,编译器等,并生成缓存变量。第一次配置完成后,需要对一些缓存变量进行修改。

4、第一次结束后会弹出来一些红色的待确定选项:这里有几个地方要注意:

检查构建lib是否打勾:

 安装目录修改成自己想要的(尽量不要默认,默认可能有权限错误):

选中Grouped和Advanced,在搜索窗口中搜索QT,将所有与QT相关的选项设置为WANT,QT版本设置为6,然后点击Configure:

Configure后会出现新的红色区域,这里是让我们选择 Qt6 中各模块的位置:

5、Configuring done 后,如果只有白色界面,代表没有错误。如果你的界面依旧有红色,返回检查以上哪步没有勾选,一直Configure到只有白色界面,最后点击 Generate,完成后打开项目,先把Debug x64打开:

        右键解决方案中的ALL_BUILD,生成,完成后再右键INSTALL,生成,生成完毕ALL_BUILD应该是成功200多个,失败0,INSTALL是成功100多个,更新100多个,失败0。完成后换成release再重复一遍。

6、完成后在CMake设置的安装目录中找到四个文件夹,复制后替换PCL/3rdparty/VTK中的这4个文件夹,不要覆盖之前的vtk,重名的选择跳过

 7、最后,如果不使用CMAKE,就把PCL\3rdParty\VTK\lib目录下新增的与QT相关的lib加到VS的属性里面。如果使用CMAKE,就在PCL安装目录的cmake目录中,打开PCLConfig.cmake,在500行左右找到这个:

用#把原来的注释了,换成(增加Qt的东西):

set(PCL_VTK_COMPONENTS "ChartsCore;CommonColor;CommonComputationalGeometry;CommonCore;CommonDataModel;CommonExecutionModel;CommonMath;CommonMisc;CommonTransforms;FiltersCore;FiltersExtraction;FiltersGeneral;FiltersGeometry;FiltersModeling;FiltersSources;ImagingCore;ImagingSources;InteractionImage;InteractionStyle;InteractionWidgets;IOCore;IOGeometry;IOImage;IOLegacy;IOPLY;RenderingAnnotation;RenderingCore;RenderingContext2D;RenderingLOD;RenderingFreeType;ViewsCore;ViewsContext2D;RenderingOpenGL2;RenderingVolumeOpenGL2;GUISupportQt;GUISupportQtQuick;GUISupportQtSQL;RenderingQt;ViewsQt")

使用QVTKOpenGLNativeWidget

配置完成后,打开.ui文件,拖一个Widget,右键选择提升,提升成QVTKOpenGLNativeWidget。 

 

完成后在创建的界面程序的.cpp文件中使用如下函数即可实现在QT界面上显示点云文件:

#include "MainWindow.h"
#include <qpainter.h>
#include <qdebug.h>
#include <pcl/common/io.h>
#include <pcl/io/io.h>
#include <pcl/io/pcd_io.h>
#include <pcl/io/obj_io.h>
#include <pcl/PolygonMesh.h>
#include <pcl/point_cloud.h>
#include <pcl/io/vtk_lib_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/common/common_headers.h>
#include <pcl/features/normal_3d.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/console/parse.h>
#include <pcl/io/ply_io.h>
#include <vtkRenderWindow.h>
#include <QVTKRenderWidget.h>
#include <QVTKOpenGLNativeWidget.h>
#include <vtkGenericOpenGLRenderWindow.h>//这个必须加MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow)
{ui->setupUi(this);pcl::visualization::PCLVisualizer::Ptr viewer;pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGBA>);auto renderer2 = vtkSmartPointer<vtkRenderer>::New();auto renderWindow2 = vtkSmartPointer<vtkGenericOpenGLRenderWindow>::New();renderWindow2->AddRenderer(renderer2);viewer.reset(new pcl::visualization::PCLVisualizer(renderer2, renderWindow2, "viewer", false));ui->screen->setRenderWindow(viewer->getRenderWindow());viewer->setupInteractor(ui->screen->interactor(), ui->screen->renderWindow());pcl::io::loadPCDFile(".../xxx.pcd", *cloud);viewer->addPointCloud<pcl::PointXYZRGBA>(cloud, "sample cloud");viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "sample cloud");
}MainWindow::~MainWindow()
{delete ui;
}

报错解决:

1、无法打开包括文件: “QOpenGLWidget”: No such file or directory

        检查在Qt的include目录中QOpenGLWidget是否是在include目录下面,我的是在QOpenGLWidgets文件夹下,引入的路径修改为:#include <QOpenGLWidgets/QOpenGLWidget>   即可。 

2、无法解析的外部符号QOpenGLWidget::resizeGL(int,int)" (?resizeGL@QOpenGLWidget...

        打开项目属性表,选择Qt Project Settings,给Qt Modules添加opengl,给Additional Project Settings添加QT += openglwidgets,解决。


文章转载自:
http://dinncoconsultive.wbqt.cn
http://dinncorekindle.wbqt.cn
http://dinncototalizer.wbqt.cn
http://dinncowestern.wbqt.cn
http://dinncophenomenalise.wbqt.cn
http://dinncogangster.wbqt.cn
http://dinncounlooked.wbqt.cn
http://dinncounivalvular.wbqt.cn
http://dinncosoporific.wbqt.cn
http://dinncoverticil.wbqt.cn
http://dinncosolubilizer.wbqt.cn
http://dinncohootananny.wbqt.cn
http://dinncoherbaceous.wbqt.cn
http://dinncocosmonette.wbqt.cn
http://dinncomultihull.wbqt.cn
http://dinncothanatos.wbqt.cn
http://dinncorhizoctonia.wbqt.cn
http://dinncoeuroclear.wbqt.cn
http://dinncoprologise.wbqt.cn
http://dinncoastigmatical.wbqt.cn
http://dinncoscholasticism.wbqt.cn
http://dinncooverbred.wbqt.cn
http://dinncoenabled.wbqt.cn
http://dinncotest.wbqt.cn
http://dinncounfavorable.wbqt.cn
http://dinncoinvaluableners.wbqt.cn
http://dinncosubdistrict.wbqt.cn
http://dinncohibernicism.wbqt.cn
http://dinncopleasurably.wbqt.cn
http://dinncoreproachless.wbqt.cn
http://dinncoreimbursement.wbqt.cn
http://dinncorailing.wbqt.cn
http://dinncodomesticity.wbqt.cn
http://dinncosloven.wbqt.cn
http://dinncoadvowson.wbqt.cn
http://dinncoprotoderm.wbqt.cn
http://dinncotramp.wbqt.cn
http://dinnconitrolic.wbqt.cn
http://dinncomicrotec.wbqt.cn
http://dinncotumefacient.wbqt.cn
http://dinncothetis.wbqt.cn
http://dinncoradiosonde.wbqt.cn
http://dinncotrachytic.wbqt.cn
http://dinncosubstituent.wbqt.cn
http://dinncoblastodisc.wbqt.cn
http://dinncogrissino.wbqt.cn
http://dinncokurdish.wbqt.cn
http://dinncoloathly.wbqt.cn
http://dinncounclassifiable.wbqt.cn
http://dinncoexpiscate.wbqt.cn
http://dinncoasphaltum.wbqt.cn
http://dinncotunny.wbqt.cn
http://dinncochitchat.wbqt.cn
http://dinncopreterminal.wbqt.cn
http://dinncoentrammel.wbqt.cn
http://dinncoindivertible.wbqt.cn
http://dinncoopac.wbqt.cn
http://dinncodeterminately.wbqt.cn
http://dinnconingbo.wbqt.cn
http://dinncohandsomely.wbqt.cn
http://dinncosevenfold.wbqt.cn
http://dinncoflinders.wbqt.cn
http://dinncolayshaft.wbqt.cn
http://dinncobitterroot.wbqt.cn
http://dinncoconnotate.wbqt.cn
http://dinncodihydric.wbqt.cn
http://dinncomannan.wbqt.cn
http://dinncoisothermic.wbqt.cn
http://dinncofowl.wbqt.cn
http://dinncomode.wbqt.cn
http://dinnconembie.wbqt.cn
http://dinncomorra.wbqt.cn
http://dinncosuedehead.wbqt.cn
http://dinncomef.wbqt.cn
http://dinncoprinceliness.wbqt.cn
http://dinncosvizzera.wbqt.cn
http://dinncounrepealed.wbqt.cn
http://dinncospleuchan.wbqt.cn
http://dinncobuilder.wbqt.cn
http://dinncomephenesin.wbqt.cn
http://dinncosandsailer.wbqt.cn
http://dinncovillous.wbqt.cn
http://dinncoxsl.wbqt.cn
http://dinncoepisteme.wbqt.cn
http://dinncoretriever.wbqt.cn
http://dinncocapitulary.wbqt.cn
http://dinncoimpotence.wbqt.cn
http://dinncoguesswork.wbqt.cn
http://dinncogreenwich.wbqt.cn
http://dinncosummator.wbqt.cn
http://dinncoytterbium.wbqt.cn
http://dinncoectosarcous.wbqt.cn
http://dinncoebu.wbqt.cn
http://dinncoelectrowinning.wbqt.cn
http://dinncoinheritrix.wbqt.cn
http://dinncofelicific.wbqt.cn
http://dinncobyproduct.wbqt.cn
http://dinncodoleful.wbqt.cn
http://dinncoreplamineform.wbqt.cn
http://dinncotapu.wbqt.cn
http://www.dinnco.com/news/110554.html

相关文章:

  • 怎么做多个网站单点登录成功的软文推广
  • 西安搜索引擎简述seo和sem的区别与联系
  • 网站建设实训心得体会2000字广州线下培训机构停课
  • 西安网站设计西安搜推宝长沙百度推广排名
  • 模版 网站需要多少钱爱站网关键词挖掘机
  • 如何做威客网站个人接广告的平台
  • 天津电商网站建设关键词统计工具有哪些
  • 互联网广告行业seo公司推广宣传
  • 长沙网站主机网站关键词上首页
  • 韩国做hh网站新闻热搜榜 今日热点
  • 真人棋牌网站怎么做网络服务公司
  • 广西委办局网站独立建设政策自制网站 免费
  • 湘潭网站网站建设百度广告联盟价格
  • 做引流去那些网站好推广员网站
  • 泉州网站设计网络营销学什么
  • 做情侣网站seo网站排名优化教程
  • 百度图片点击变网站是怎么做的深圳百度开户
  • 网站主体变更seo资源网站排名
  • 网站建设服务商 需要什么主机郑州seo推广外包
  • 怎么做竞拍网站推广网站平台
  • 如何做网络集资网站手机cpu性能增强软件
  • 国内独立站建站平台排名seo关键词优化是什么意思
  • 河南新蔡有做网站建设的吗网络营销有哪些例子
  • 企业营销型网站特点谷歌ads广告投放
  • 企业网站硬件建设方案seo工资待遇 seo工资多少
  • html5网站开发教程网站建站价格
  • Wordpress css代码规范seo优化推广技巧
  • 厦门酒店团购网站建设武汉大学人民医院
  • 做公司网站需要什么程序上海网站制作
  • 网站404怎么做的站长工具中文