随笔分类 - Qt
摘要:uchar *bits = nullptr; void initBuff(size_t size) { if (bits == nullptr) { bits = new uchar[size]; } } void releaseBuff() { if (bits != nullptr) { del
阅读全文
摘要:https://blog.csdn.net/qq_44575789/article/details/127935697像素处理太慢,这里换种方式 #pragma once #include <QDebug> #include <QImage> #include <QTimer> #include <
阅读全文
摘要:创建并获取窗口句柄 view->show(); view->createWinId(); auto wid = view->winId(); 获取图片 // 三秒钟之后 QTimer::singleShot(3000, [wid]() { auto&& image = GetGDIBitmap((H
阅读全文
vtkOpenGLFramebufferObject (000001DCC7696900): failed at glDeleteFramebuffers 16 OpenGL errors detec
摘要:VTK使用CDockManager时弹出窗口提示OpenGL删除缓冲区错误 vtkOpenGLFramebufferObject (000001DCC7696900): failed at glDeleteFramebuffers 16 OpenGL errors detec 解决办法:OpenGL
阅读全文
摘要:核心部分 识别文本编码,这里使用ICU 核心代码 /// <summary> /// 读取文本文件内容并返回QString /// </summary> /// <param name="path">文件路径</param> /// <returns>文本内容</returns> static QS
阅读全文
摘要:思路 PCL拟合出来的圆柱为圆柱轴线的法向量和轴线过的一个点,本身和半径,不包含高度和起始点以及中止点,不过会返回使用到的点云信息。 通过一点和法向量可以计算出轴线方程将用到的点全部投影到这条直线上,获取新的在直线上的点云直线上的点两个端点就是起始点,通过起始点可以计算出高度步骤3的计算过程可以将直
阅读全文
摘要:效果 头文件GrayVirsual.h #pragma once #include <QtWidgets/QMainWindow> #include <QVTKOpenGLNativeWidget.h> #include <opencv2/core/core.hpp> #include <openc
阅读全文
摘要:效果 子窗口头文件ViewWidget3D.h #pragma once #include <QMainWindow> #include <QVTKOpenGLNativeWidget.h> #include <vtkActor.h> #include <vtkCamera.h> #include
阅读全文
摘要:参考链接 主要代码 #include "VTKOCCT.h" #include <BRepPrimAPI_MakeBox.hxx> #include <BRepPrimAPI_MakeCone.hxx> #include <IVtkTools_ShapeDataSource.hxx> #includ
阅读全文
摘要:子程序主要代码 #include "ChildWidgets.h" #include <QtWidgets/QApplication> #include <QWindow> #include <iostream> #include <QMessageBox> #include <thread> in
阅读全文
摘要:主要参考 https://blog.csdn.net/qq_37996632/article/details/106415402 https://kitware.github.io/vtk-examples/site/Cxx/Qt/BorderWidgetQt 主要代码 #include "Bord
阅读全文
摘要:关键代码 #include "mainwindow.h" #include "ui_mainwindow.h" #include <QToolBar> #include <QMessageBox> class QMenuBar; class QToolBar; MainWindow::MainWin
阅读全文