随笔分类 -  VTK学习

摘要:格式1: 1. 定义回调函数, void MyCallbackFunc( vtkObject* caller, long unsigned int eventId, void* clientData, void* callData ) { //输出鼠标点击的次数 std::cout<<"You ha 阅读全文
posted @ 2022-06-13 09:14 二先生- 阅读(429) 评论(0) 推荐(0) 编辑
摘要:int main() { const int num_points = 5; static float x[num_points][3] = { {0,0,0},{1,0,0},{1,1,0},{0,1,0},{0.5,0.5,1} }; static vtkIdType pts[4][3] = { 阅读全文
posted @ 2022-04-16 15:12 二先生- 阅读(52) 评论(0) 推荐(0) 编辑
摘要:本来要做的是地层模型,没想到阴差阳错做了两个地层,如果继续把周围点连接成面会得到一个中空的地质体。果断放弃,另辟蹊径。 string Trim(string& str) { //str.find_first_not_of(" \t\r\n"),在字符串str中从索引0开始,返回首次不匹配"\t\r\ 阅读全文
posted @ 2022-04-16 15:11 二先生- 阅读(41) 评论(0) 推荐(0) 编辑
摘要:int main() { int i; static float x[8][3] = { {0,0,0},{1,0,0},{1,1,0},{0,1,0}, {0,0,1},{1,0,1},{1,1,1},{0,1,1} }; static vtkIdType pts[6][4] = { {0,1,2 阅读全文
posted @ 2022-04-15 14:57 二先生- 阅读(186) 评论(0) 推荐(0) 编辑
摘要:1 string Trim(string& str) 2 { 3 //str.find_first_not_of(" \t\r\n"),在字符串str中从索引0开始,返回首次不匹配"\t\r\n"的位置 4 str.erase(0, str.find_first_not_of(" \t\r\n")) 阅读全文
posted @ 2022-04-11 21:33 二先生- 阅读(313) 评论(0) 推荐(0) 编辑
摘要:string Trim(string& str) { //str.find_first_not_of(" \t\r\n"),在字符串str中从索引0开始,返回首次不匹配"\t\r\n"的位置 str.erase(0, str.find_first_not_of(" \t\r\n")); str.er 阅读全文
posted @ 2022-03-28 20:54 二先生- 阅读(498) 评论(0) 推荐(0) 编辑
摘要:主要流程:1. 获取三角网格数据 2. 三角网剖分 string Trim(string& str) { //str.find_first_not_of(" \t\r\n"),在字符串str中从索引0开始,返回首次不匹配"\t\r\n"的位置 str.erase(0, str.find_first_ 阅读全文
posted @ 2022-03-27 14:18 二先生- 阅读(291) 评论(0) 推荐(0) 编辑
摘要:图片是从网上下载,先将其处理为灰度图像,之后进行边缘检测。 #ifndef INITIAL_OPENGL #define INITIAL_OPENGL #include"vtkAutoInit.h" VTK_MODULE_INIT(vtkRenderingOpenGL2) VTK_MODULE_IN 阅读全文
posted @ 2022-03-22 13:55 二先生- 阅读(248) 评论(0) 推荐(0) 编辑
摘要:#include <vtkSmartPointer.h> #include <vtkSimplePointsReader.h> #include <vtkPolyDataMapper.h> #include <vtkActor.h> #include <vtkProperty.h> #include 阅读全文
posted @ 2022-03-18 10:49 二先生- 阅读(136) 评论(0) 推荐(0) 编辑
摘要:读取到VTK数据后,将数据组织起来并添加属性值。 示例: #include <vtkSmartPointer.h> #include <vtkPoints.h> #include <vtkPolygon.h> #include <vtkTriangle.h> #include <vtkCellArr 阅读全文
posted @ 2022-03-18 10:46 二先生- 阅读(567) 评论(0) 推荐(0) 编辑
摘要:#include <vtkSmartPointer.h> #include <vtkSimplePointsReader.h> #include <vtkPolyDataMapper.h> #include <vtkActor.h> #include <vtkProperty.h> #include 阅读全文
posted @ 2022-03-05 20:07 二先生- 阅读(370) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示