随笔分类 - VTK学习
摘要:格式1: 1. 定义回调函数, void MyCallbackFunc( vtkObject* caller, long unsigned int eventId, void* clientData, void* callData ) { //输出鼠标点击的次数 std::cout<<"You ha
阅读全文
摘要: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] = {
阅读全文
摘要:本来要做的是地层模型,没想到阴差阳错做了两个地层,如果继续把周围点连接成面会得到一个中空的地质体。果断放弃,另辟蹊径。 string Trim(string& str) { //str.find_first_not_of(" \t\r\n"),在字符串str中从索引0开始,返回首次不匹配"\t\r\
阅读全文
摘要: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
阅读全文
摘要: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"))
阅读全文
摘要: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
阅读全文
摘要:主要流程: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_
阅读全文
摘要:图片是从网上下载,先将其处理为灰度图像,之后进行边缘检测。 #ifndef INITIAL_OPENGL #define INITIAL_OPENGL #include"vtkAutoInit.h" VTK_MODULE_INIT(vtkRenderingOpenGL2) VTK_MODULE_IN
阅读全文
摘要:#include <vtkSmartPointer.h> #include <vtkSimplePointsReader.h> #include <vtkPolyDataMapper.h> #include <vtkActor.h> #include <vtkProperty.h> #include
阅读全文
摘要:读取到VTK数据后,将数据组织起来并添加属性值。 示例: #include <vtkSmartPointer.h> #include <vtkPoints.h> #include <vtkPolygon.h> #include <vtkTriangle.h> #include <vtkCellArr
阅读全文
摘要:#include <vtkSmartPointer.h> #include <vtkSimplePointsReader.h> #include <vtkPolyDataMapper.h> #include <vtkActor.h> #include <vtkProperty.h> #include
阅读全文