VTK9.2.0+QT5.14.0绘制三维显示背景

背景

上一篇绘制点云的博文中,使用的vtkCameraOrientationWidget来绘制的坐标轴,最近又学习到两种新的坐标轴绘制形式。

vtkOrientationMarkerWidget + vtkAxesActor

单独使用vtkAxesActor能够绘制出坐标轴,但是会随着鼠标操作旋转和平移时,在三维窗口中移动。搭配vtkOrientationMarkerWidget 的话能够在三维窗口的widget中,再放置一个小的widget,专门放置vtkAxesActor,可以达到停留在窗口左下角,只随着鼠标旋转的目的。

在头文件中定义vtkOrientationMarkerWidget 的对象

	vtkSmartPointer<vtkOrientationMarkerWidget> markerOrientationWidget;
void QVtkDemo2::testVtk3D()
{//创建着色器对象vtkSmartPointer<vtkRenderer> g_vtkRenderer = vtkSmartPointer<vtkRenderer>::New();//设置背景颜色g_vtkRenderer->SetBackground(.1, .2, .4);//创建point对象vtkSmartPointer<vtkPoints> g_vtkPoints = vtkSmartPointer<vtkPoints>::New();g_vtkPoints->SetNumberOfPoints(200);//创建cell对象vtkSmartPointer<vtkCellArray> g_vtkVertices = vtkSmartPointer<vtkCellArray>::New();vtkIdType id[1];//随机生成200个点float minz = VTK_FLOAT_MAX, maxz = VTK_FLOAT_MIN;for (int i = 0; i < 200; i++){float x = rand() % 10;float y = rand() % 10;float z = rand() % 10;//提前申请了points的数量,使用set比insert速度更快g_vtkPoints->SetPoint(i, x, y, z);id[0] = i;g_vtkVertices->InsertNextCell(1, id);if (z > maxz){maxz = z;}if (z < minz){minz = z;}}//创建poly对象vtkSmartPointer<vtkPolyData> g_vtkpolyData = vtkSmartPointer<vtkPolyData>::New();g_vtkpolyData->SetPoints(g_vtkPoints);g_vtkpolyData->SetVerts(g_vtkVertices);vtkSmartPointer<vtkVertexGlyphFilter> g_glyphFilter = vtkSmartPointer<vtkVertexGlyphFilter>::New();g_glyphFilter->SetInputData(g_vtkpolyData);g_glyphFilter->Update();vtkSmartPointer<vtkElevationFilter> g_elevationFilter = vtkSmartPointer<vtkElevationFilter>::New();g_elevationFilter->SetInputConnection(g_glyphFilter->GetOutputPort());g_elevationFilter->SetLowPoint(0, 0, minz);g_elevationFilter->SetHighPoint(0, 0, maxz);//创建polyMappervtkSmartPointer<vtkPolyDataMapper> g_vtkpointsMapper = vtkSmartPointer<vtkPolyDataMapper>::New();g_vtkpointsMapper->SetInputConnection(g_elevationFilter->GetOutputPort());//创建ActorvtkSmartPointer<vtkActor> g_vtkpointsActor = vtkSmartPointer<vtkActor>::New();g_vtkpointsActor->SetMapper(g_vtkpointsMapper);g_vtkpointsActor->GetProperty()->SetPointSize(3);//设置点的大小g_vtkRenderer->AddActor(g_vtkpointsActor);vtkNew<vtkLookupTable> lut = vtkNew<vtkLookupTable>::vtkNew();lut->SetNumberOfTableValues(7);lut->SetHueRange(0.0, 0.67);lut->SetTableRange(minz, maxz);lut->Build();vtkNew<vtkScalarBarActor> colorBar = vtkNew<vtkScalarBarActor>::vtkNew();colorBar->SetLookupTable(lut);colorBar->SetNumberOfLabels(7);colorBar->SetBarRatio(0.10);colorBar->SetUnconstrainedFontSize(0.05);colorBar->SetMaximumHeightInPixels(100);colorBar->SetDisplayPosition(500, 80);g_vtkRenderer->AddActor2D(colorBar);//根据点云的包围盒,寻找最佳的显示视点位置g_vtkRenderer->ResetCamera();//ui中的绘制窗口添加定义的着色器ui.openGLWidget->renderWindow()->AddRenderer(g_vtkRenderer);//开始三维渲染ui.openGLWidget->renderWindow()->Render();//绘制坐标轴vtkSmartPointer<vtkAxesActor> axes_actor = vtkSmartPointer<vtkAxesActor>::New();axes_actor->SetPosition(0, 0, 0);axes_actor->SetTotalLength(50, 50, 50);//axes_actor->SetScale(5.0);//axes_actor->SetShaftType(0);//axes_actor->SetCylinderRadius(0.1);//axes_actor->SetConeRadius(0.3);//axes_actor->SetAxisLabels(1);//axes_actor->SetTipType(0); //坐标轴顶部为圆锥体axes_actor->GetXAxisShaftProperty()->SetColor(1, 0, 1);axes_actor->GetXAxisTipProperty()->SetColor(1, 0, 1);axes_actor->GetZAxisShaftProperty()->SetColor(1, 1, 0);axes_actor->GetZAxisTipProperty()->SetColor(1, 1, 0);markerOrientationWidget = vtkSmartPointer<vtkOrientationMarkerWidget>::New();markerOrientationWidget->SetOrientationMarker(axes_actor);markerOrientationWidget->SetInteractor(ui.openGLWidget->interactor());markerOrientationWidget->SetCurrentRenderer(g_vtkRenderer);markerOrientationWidget->SetDefaultRenderer(g_vtkRenderer);markerOrientationWidget->SetViewport(0.0, 0.0, 0.2, 0.2);markerOrientationWidget->SetEnabled(1);markerOrientationWidget->SetZoom(1.2);markerOrientationWidget->SetInteractive(false);return;
}

在这里插入图片描述
可以为三维空间添加一个网格底面,如图所示
在这里插入图片描述
只需要在上述代码中,创建一个新的Actor以及对应的Mapper和PlaneSource,然后向renderer中添加一个额外的Actor,并通过vtkCamera来设定我们当前的视角,提升观感

void QVtkDemo2::testVtk3D()
{//创建着色器对象vtkSmartPointer<vtkRenderer> g_vtkRenderer = vtkSmartPointer<vtkRenderer>::New();//设置背景颜色g_vtkRenderer->SetBackground(.1, .2, .4);//创建point对象vtkSmartPointer<vtkPoints> g_vtkPoints = vtkSmartPointer<vtkPoints>::New();g_vtkPoints->SetNumberOfPoints(200);//创建cell对象vtkSmartPointer<vtkCellArray> g_vtkVertices = vtkSmartPointer<vtkCellArray>::New();vtkIdType id[1];//随机生成200个点float minz = VTK_FLOAT_MAX, maxz = VTK_FLOAT_MIN;for (int i = 0; i < 200; i++){float x = rand() % 10;float y = rand() % 10;float z = rand() % 10;//提前申请了points的数量,使用set比insert速度更快g_vtkPoints->SetPoint(i, x, y, z);id[0] = i;g_vtkVertices->InsertNextCell(1, id);if (z > maxz){maxz = z;}if (z < minz){minz = z;}}//创建poly对象vtkSmartPointer<vtkPolyData> g_vtkpolyData = vtkSmartPointer<vtkPolyData>::New();g_vtkpolyData->SetPoints(g_vtkPoints);g_vtkpolyData->SetVerts(g_vtkVertices);vtkSmartPointer<vtkVertexGlyphFilter> g_glyphFilter = vtkSmartPointer<vtkVertexGlyphFilter>::New();g_glyphFilter->SetInputData(g_vtkpolyData);g_glyphFilter->Update();vtkSmartPointer<vtkElevationFilter> g_elevationFilter = vtkSmartPointer<vtkElevationFilter>::New();g_elevationFilter->SetInputConnection(g_glyphFilter->GetOutputPort());g_elevationFilter->SetLowPoint(0, 0, minz);g_elevationFilter->SetHighPoint(0, 0, maxz);//创建polyMappervtkSmartPointer<vtkPolyDataMapper> g_vtkpointsMapper = vtkSmartPointer<vtkPolyDataMapper>::New();g_vtkpointsMapper->SetInputConnection(g_elevationFilter->GetOutputPort());//创建ActorvtkSmartPointer<vtkActor> g_vtkpointsActor = vtkSmartPointer<vtkActor>::New();g_vtkpointsActor->SetMapper(g_vtkpointsMapper);g_vtkpointsActor->GetProperty()->SetPointSize(3);//设置点的大小g_vtkRenderer->AddActor(g_vtkpointsActor);vtkNew<vtkLookupTable> lut = vtkNew<vtkLookupTable>::vtkNew();lut->SetNumberOfTableValues(7);lut->SetHueRange(0.0, 0.67);lut->SetTableRange(minz, maxz);lut->Build();vtkNew<vtkScalarBarActor> colorBar = vtkNew<vtkScalarBarActor>::vtkNew();colorBar->SetLookupTable(lut);colorBar->SetNumberOfLabels(7);colorBar->SetBarRatio(0.10);colorBar->SetUnconstrainedFontSize(0.05);colorBar->SetMaximumHeightInPixels(100);colorBar->SetDisplayPosition(500, 80);g_vtkRenderer->AddActor2D(colorBar);//定义一个平面vtkSmartPointer<vtkPlaneSource> mReferencePlaneSource;vtkSmartPointer<vtkPolyDataMapper> mReferencePlaneMapper;vtkSmartPointer<vtkActor>  mReferencePlaneActor;//添加平面mReferencePlaneSource = vtkSmartPointer<vtkPlaneSource>::New();mReferencePlaneMapper = vtkSmartPointer<vtkPolyDataMapper>::New();mReferencePlaneActor = vtkSmartPointer<vtkActor>::New();mReferencePlaneSource->SetXResolution(20);mReferencePlaneSource->SetYResolution(20);mReferencePlaneSource->SetOrigin(-10.0, -10.0, -6.0); //根据视野范围来调整mReferencePlaneSource->SetPoint1(10.0, -10.0, -6.0);mReferencePlaneSource->SetPoint2(-10.0, 10.0, -6.0);mReferencePlaneMapper->SetInputConnection(mReferencePlaneSource->GetOutputPort());mReferencePlaneActor->SetMapper(mReferencePlaneMapper);mReferencePlaneActor->GetProperty()->SetRepresentationToWireframe();mReferencePlaneActor->GetProperty()->SetColor(0.5, 1.0, 1.0);mReferencePlaneActor->SetVisibility(true);g_vtkRenderer->AddActor(mReferencePlaneActor);vtkSmartPointer<vtkCamera> _vtk_icamera = vtkSmartPointer<vtkCamera>::New();_vtk_icamera->SetPosition(50.0, 50.0, 30.0);_vtk_icamera->SetFocalPoint(0.0, 0.0, 0.0);_vtk_icamera->SetViewUp(0.0, 0.0, 1.0);_vtk_icamera->ComputeViewPlaneNormal();if (_vtk_icamera){g_vtkRenderer->SetActiveCamera(_vtk_icamera);g_vtkRenderer->ResetCamera();}//根据点云的包围盒,寻找最佳的显示视点位置//g_vtkRenderer->ResetCamera();//ui中的绘制窗口添加定义的着色器ui.openGLWidget->renderWindow()->AddRenderer(g_vtkRenderer);//开始三维渲染ui.openGLWidget->renderWindow()->Render();//绘制坐标轴vtkSmartPointer<vtkAxesActor> axes_actor = vtkSmartPointer<vtkAxesActor>::New();axes_actor->SetPosition(0, 0, 0);axes_actor->SetTotalLength(50, 50, 50);//axes_actor->SetScale(5.0);//axes_actor->SetShaftType(0);//axes_actor->SetCylinderRadius(0.1);//axes_actor->SetConeRadius(0.3);//axes_actor->SetAxisLabels(1);//axes_actor->SetTipType(0); //坐标轴顶部为圆锥体axes_actor->GetXAxisShaftProperty()->SetColor(1, 0, 1);axes_actor->GetXAxisTipProperty()->SetColor(1, 0, 1);axes_actor->GetZAxisShaftProperty()->SetColor(1, 1, 0);axes_actor->GetZAxisTipProperty()->SetColor(1, 1, 0);markerOrientationWidget = vtkSmartPointer<vtkOrientationMarkerWidget>::New();markerOrientationWidget->SetOrientationMarker(axes_actor);markerOrientationWidget->SetInteractor(ui.openGLWidget->interactor());markerOrientationWidget->SetCurrentRenderer(g_vtkRenderer);markerOrientationWidget->SetDefaultRenderer(g_vtkRenderer);markerOrientationWidget->SetViewport(0.0, 0.0, 0.2, 0.2);markerOrientationWidget->SetEnabled(1);markerOrientationWidget->SetZoom(1.2);markerOrientationWidget->SetInteractive(false);return;
}

vtkCubeAxesActor

下图是matlab的三维显示,想要绘制网格状的坐标轴,并标注坐标,VTK提供了vtkCubeAxesActor
在这里插入图片描述
vtkCubeAxesActor作为一类Actor, 因此,我们只需要定义好vtkCubeAxesActor的参数,然后添加到Renderer中即可

void QVtkDemo2::testVtk3D()
{//创建着色器对象vtkSmartPointer<vtkRenderer> g_vtkRenderer = vtkSmartPointer<vtkRenderer>::New();//设置背景颜色g_vtkRenderer->SetBackground(.1, .2, .4);//创建point对象vtkSmartPointer<vtkPoints> g_vtkPoints = vtkSmartPointer<vtkPoints>::New();g_vtkPoints->SetNumberOfPoints(200);//创建cell对象vtkSmartPointer<vtkCellArray> g_vtkVertices = vtkSmartPointer<vtkCellArray>::New();vtkIdType id[1];//随机生成200个点float minz = VTK_FLOAT_MAX, maxz = VTK_FLOAT_MIN;for (int i = 0; i < 200; i++){float x = rand() % 10;float y = rand() % 10;float z = rand() % 10;//提前申请了points的数量,使用set比insert速度更快g_vtkPoints->SetPoint(i, x, y, z);id[0] = i;g_vtkVertices->InsertNextCell(1, id);if (z > maxz){maxz = z;}if (z < minz){minz = z;}}//创建poly对象vtkSmartPointer<vtkPolyData> g_vtkpolyData = vtkSmartPointer<vtkPolyData>::New();g_vtkpolyData->SetPoints(g_vtkPoints);g_vtkpolyData->SetVerts(g_vtkVertices);vtkSmartPointer<vtkVertexGlyphFilter> g_glyphFilter = vtkSmartPointer<vtkVertexGlyphFilter>::New();g_glyphFilter->SetInputData(g_vtkpolyData);g_glyphFilter->Update();vtkSmartPointer<vtkElevationFilter> g_elevationFilter = vtkSmartPointer<vtkElevationFilter>::New();g_elevationFilter->SetInputConnection(g_glyphFilter->GetOutputPort());g_elevationFilter->SetLowPoint(0, 0, minz);g_elevationFilter->SetHighPoint(0, 0, maxz);//创建polyMappervtkSmartPointer<vtkPolyDataMapper> g_vtkpointsMapper = vtkSmartPointer<vtkPolyDataMapper>::New();g_vtkpointsMapper->SetInputConnection(g_elevationFilter->GetOutputPort());//创建ActorvtkSmartPointer<vtkActor> g_vtkpointsActor = vtkSmartPointer<vtkActor>::New();g_vtkpointsActor->SetMapper(g_vtkpointsMapper);g_vtkpointsActor->GetProperty()->SetPointSize(3);//设置点的大小g_vtkRenderer->AddActor(g_vtkpointsActor);vtkNew<vtkLookupTable> lut = vtkNew<vtkLookupTable>::vtkNew();lut->SetNumberOfTableValues(7);lut->SetHueRange(0.0, 0.67);lut->SetTableRange(minz, maxz);lut->Build();vtkNew<vtkScalarBarActor> colorBar = vtkNew<vtkScalarBarActor>::vtkNew();colorBar->SetLookupTable(lut);colorBar->SetNumberOfLabels(7);colorBar->SetBarRatio(0.10);colorBar->SetUnconstrainedFontSize(0.05);colorBar->SetMaximumHeightInPixels(100);colorBar->SetDisplayPosition(500, 80);g_vtkRenderer->AddActor2D(colorBar);//vtkCubeAxesvtkSmartPointer<vtkCubeAxesActor> cubeAxes = vtkSmartPointer<vtkCubeAxesActor>::New();auto activeCamera = g_vtkRenderer->GetActiveCamera();cubeAxes->SetCamera(activeCamera);double bounds[6] = { 0.0, 10.0, 0.0, 10.0, 0.0, 10.0 };cubeAxes->SetBounds(bounds);cubeAxes->SetXTitle("X-Axis");cubeAxes->SetYTitle("Y-Axis");cubeAxes->SetZTitle("Z-Axis");cubeAxes->GetTitleTextProperty(0)->SetColor(1.0, 0.0, 1.0);cubeAxes->GetLabelTextProperty(0)->SetColor(1.0, 0.0, 1.0);cubeAxes->GetTitleTextProperty(1)->SetColor(0.0, 1.0, 0.0);cubeAxes->GetLabelTextProperty(1)->SetColor(0.0, 1.0, 0.0);cubeAxes->GetTitleTextProperty(2)->SetColor(1.0, 1.0, 0.0);cubeAxes->GetLabelTextProperty(2)->SetColor(1.0, 1.0, 0.0);cubeAxes->SetVisibility(1);cubeAxes->SetXAxisRange(0, 10.0);cubeAxes->SetYAxisRange(0.0, 10.0);cubeAxes->SetZAxisRange(0.0, 10.0);cubeAxes->DrawXGridlinesOn();cubeAxes->DrawYGridlinesOn();cubeAxes->DrawZGridlinesOn();cubeAxes->SetDrawXInnerGridlines(0);cubeAxes->SetDrawYInnerGridlines(0);cubeAxes->SetDrawZInnerGridlines(0);cubeAxes->XAxisMinorTickVisibilityOff();cubeAxes->YAxisMinorTickVisibilityOff();cubeAxes->ZAxisMinorTickVisibilityOff();cubeAxes->SetScreenSize(30.0);cubeAxes->SetLabelOffset(20.0);cubeAxes->SetGridLineLocation(2);cubeAxes->SetTickLocation(1);cubeAxes->SetFlyMode(0);g_vtkRenderer->AddActor(cubeAxes);vtkSmartPointer<vtkCamera> _vtk_icamera = vtkSmartPointer<vtkCamera>::New();_vtk_icamera->SetPosition(50.0, 50.0, 30.0);_vtk_icamera->SetFocalPoint(0.0, 0.0, 0.0);_vtk_icamera->SetViewUp(0.0, 0.0, 1.0);_vtk_icamera->ComputeViewPlaneNormal();if (_vtk_icamera){g_vtkRenderer->SetActiveCamera(_vtk_icamera);g_vtkRenderer->ResetCamera();}//根据点云的包围盒,寻找最佳的显示视点位置//g_vtkRenderer->ResetCamera();//ui中的绘制窗口添加定义的着色器ui.openGLWidget->renderWindow()->AddRenderer(g_vtkRenderer);//开始三维渲染ui.openGLWidget->renderWindow()->Render();//绘制坐标轴vtkSmartPointer<vtkAxesActor> axes_actor = vtkSmartPointer<vtkAxesActor>::New();axes_actor->SetPosition(0, 0, 0);axes_actor->SetTotalLength(50, 50, 50);//axes_actor->SetScale(5.0);//axes_actor->SetShaftType(0);//axes_actor->SetCylinderRadius(0.1);//axes_actor->SetConeRadius(0.3);//axes_actor->SetAxisLabels(1);//axes_actor->SetTipType(0); //坐标轴顶部为圆锥体axes_actor->GetXAxisShaftProperty()->SetColor(1, 0, 1);axes_actor->GetXAxisTipProperty()->SetColor(1, 0, 1);axes_actor->GetZAxisShaftProperty()->SetColor(1, 1, 0);axes_actor->GetZAxisTipProperty()->SetColor(1, 1, 0);markerOrientationWidget = vtkSmartPointer<vtkOrientationMarkerWidget>::New();markerOrientationWidget->SetOrientationMarker(axes_actor);markerOrientationWidget->SetInteractor(ui.openGLWidget->interactor());markerOrientationWidget->SetCurrentRenderer(g_vtkRenderer);markerOrientationWidget->SetDefaultRenderer(g_vtkRenderer);markerOrientationWidget->SetViewport(0.0, 0.0, 0.2, 0.2);markerOrientationWidget->SetEnabled(1);markerOrientationWidget->SetZoom(1.2);markerOrientationWidget->SetInteractive(false);return;
}

在这里插入图片描述

带灰度纹理点云的三维显示

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/15664.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

微服务中使用Maven BOM来管理你的版本依赖

摘要: 原创出处 sf.gg/a/1190000021198564 「飘渺Jam」欢迎转载&#xff0c;保留摘要&#xff0c;谢谢&#xff01; 为什么要使用BOM? 如何定义BOM? 项目使用方法? BOM&#xff08;Bill of Materials&#xff09;是由Maven提供的功能,它通过定义一整套相互兼容的jar包版…

通过 NIO + 多线程 提升硬件设备与系统的数据传输性能

一、项目展示 下图&#xff08;模拟的数据可视化大屏&#xff09;中数据是动态显示的 二、项目简介 描述&#xff1a;使用Client模拟了硬件设备&#xff0c;比如可燃气体浓度检测器。Client通过Socket与Server建立连接&#xff0c;Server保存数据到txt文件&#xff0c;并使用W…

结构体(位段)内存分配

结构体由多个数据类型的成员组成。那编译器分配的内存是不是所有成员的字节数总和呢&#xff1f; 首先&#xff0c;stu的内存大小并不为29个字节&#xff0c;即证明结构体内存不是所有成员的字节数和。   其次&#xff0c;stu成员中sex的内存位置不在21&#xff0c;即可推测…

Linux服务器安装docker,基于Linux(openEuler、CentOS8)

本实验环境为openEuler系统(以server方式安装)&#xff08;CentOS8基本一致&#xff0c;可参考本文) 目录 知识点实验 知识点 Docker 是一个开源的应用容器引擎。它允许开发者将应用及其所有依赖项打包到一个可移植的容器中&#xff0c;并发布到任何支持Docker的流行Linux或Wi…

【Linux】TCP协议【上】{协议段属性:源端口号/目的端口号/序号/确认序号/窗口大小/紧急指针/标记位}

文章目录 1.引入2.协议段格式4位首部长度16位窗口大小32位序号思考三个问题【demo】标记位URG: 紧急指针是否有效提升某报文被处理优先级【0表示不设置1表示设置】ACK: 确认号是否有效PSH: 提示接收端应用程序立刻从TCP缓冲区把数据读走RST: 对方要求重新建立连接; 我们把携带R…

windows 设置系统字体 (win11 win10)

由于微软的字体是有版权的&#xff0c;所以我打算替换掉 1.下载替换工具 github的项目&#xff0c;看起来很多人对微软默认字体带版权深恶痛绝。 项目地址&#xff1a;nomeiryoUi地址 这里选取最新的版本即可 2.打开软件 这里显示标题栏不能改&#xff0c;确认&#xff0c;其…

盖雅技能发展云,助力制造企业人效合一

制造行业尽管经历多次变革&#xff0c;但企业对人的管理始终是一项高度依赖经验和耗费人力的工作。随着供应链管理和生产设备的自动化、数字化升级&#xff0c;如何将第一生产要素——人&#xff0c;通过数字化的工具融入制造过程的闭环&#xff0c;对企业实现自动化工厂和智能…

力扣 滑动窗口题目总结

Leetcode3.无重复字符的最长子串 思路&#xff1a; 这道题主要用到思路是&#xff1a;滑动窗口 什么是滑动窗口&#xff1f; 其实就是一个队列,比如例题中的 abcabcbb&#xff0c;进入这个队列&#xff08;窗口&#xff09;为 abc 满足题目要求&#xff0c;当再进入 a&#x…

牛客NC334 字典序第K小【困难 10叉树 Java/Go/PHP/C++】,力扣 440. 字典序的第K小数字

题目 题目链接&#xff1a; https://www.nowcoder.com/practice/670c2bda374241d7ae06ade60de33e8b https://leetcode.cn/problems/k-th-smallest-in-lexicographical-order/description/ 本答案核心 10叉树, 数学规律Java代码 import java.util.*;public class Solution {…

大模型的灵魂解读:Anthropic AI的Claude3 Sonnet可解释性研究

大模型技术论文不断&#xff0c;每个月总会新增上千篇。本专栏精选论文重点解读&#xff0c;主题还是围绕着行业实践和工程量产。若在某个环节出现卡点&#xff0c;可以回到大模型必备腔调重新阅读。而最新科技&#xff08;Mamba,xLSTM,KAN&#xff09;则提供了大模型领域最新技…

Vue集成Iframe

一、应用场景&#xff0c;为什么要集成Iframe&#xff1f; 1、庞大项目拆分后&#xff0c;便于管理和部署&#xff0c;用集成Iframe的方法合并 2、避免功能重复开发&#xff0c;共用模块可单独开发为一个项目&#xff0c;既可独立部署&#xff0c;也可集成到中台系统 二、集成…

[算法][前缀和] [leetcode]724. 寻找数组的中心下标

题目地址 https://leetcode.cn/problems/find-pivot-index/description/ 题目描述 代码 class Solution {public int pivotIndex(int[] nums) {int total Arrays.stream(nums).sum();//前缀和int prefixSum 0;int len nums.length;for(int i 0;i<len;i){if (i-1>0){p…

小猪APP分发:一站式托管服务,轻松玩转应用市场

在当今移动应用爆炸式增长的时代&#xff0c;开发者们面临的挑战不再仅限于创意的火花和代码的实现&#xff0c;更在于如何让精心打造的应用快速触达广大用户。这正是小猪APP分发www.appzhu.net应运而生的背景——作为一个全面、高效的APP托管服务分发平台&#xff0c;它为开发…

基于PHP的物业管理的设计与实现

第1章 绪论... 1 1.1 研究背景与意义... 1 1.2 国内外发展现状... 2 第2章 关键技术介绍... 3 2.1 PHP语言... 3 2.2 MySQL数据库... 3 2.3 Zend框架... 4 2.4 B/S架构... 4 第3章 系统需求分析... 5 3.1 可行性分析... 5 3.1.1 技术可行性分析... 5 3.1.2 经济可行…

金职优学:分析央国企面试如何通关?

在当今竞争激烈的就业市场中&#xff0c;中央和国有企业&#xff08;以下简称“央国企”&#xff09;的面试机会对求职者来说是非常有吸引力的。这些企业通常拥有稳定的发展前景、良好的薪酬福利和广阔的职业发展空间。但是&#xff0c;要想成功通过央国企的面试&#xff0c;求…

探索Python编程世界:从基础到实战

新书上架~&#x1f447;全国包邮奥~ python实用小工具开发教程http://pythontoolsteach.com/3 欢迎关注我&#x1f446;&#xff0c;收藏下次不迷路┗|&#xff40;O′|┛ 嗷~~ 目录 一、Python语言简介与动态特性 代码示例&#xff1a;动态类型与变量命名 二、Python应用领…

vue 表格表头展示不下,显示。。。;鼠标悬浮展示全部

vue 表格表头展示不下&#xff0c;显示。。。&#xff1b;鼠标悬浮展示全部 <templateslot-scope"scope"slot"header"><span:title"临时证券类型"style"white-space:nowrap">{{ 临时证券类型 }}</span></templa…

Terminal Web终端基础(Web IDE 技术探索 二)

Terminal是web终端技术&#xff0c;类似cmd命令窗口&#xff0c;Webcontainer 中推荐使用的是Xterm.js&#xff0c;这里就不细说Xterm.js 的使用了&#xff0c;我们使用第三方库来实现&#xff08;原生确实有点难用&#xff09;。 vue-web-terminal 一个由 Vue 构建的支持多内容…

【设计模式】JAVA Design Patterns——Bytecode(字节码模式)

&#x1f50d;目的 允许编码行为作为虚拟机的指令 &#x1f50d;解释 真实世界例子 一个团队正在开发一款新的巫师对战游戏。巫师的行为需要经过精心的调整和上百次的游玩测试。每次当游戏设计师想改变巫师行为时都让程序员去修改代码这是不妥的&#xff0c;所以巫师行为以数据…

AcW木棒-XMUOJ恢复破碎的符咒木牌-DFS与剪枝

题目 思路 话不多说&#xff0c;直接上代码 代码 /* AcW木棒-XMUOJ恢复破碎的符咒木牌 搜索顺序&#xff1a;从小到大枚举最终的长度 len从前往后依次拼每根长度为len的木棍 优化&#xff1a; 1.优化搜索顺序&#xff1a;优先选择深度短的来搜索&#xff0c;故从大到小去枚…