当前位置:网站首页>VMTK环境配置记录
VMTK环境配置记录
2022-08-02 05:12:00 【Amelie_11】
1.安装VMTK
下载链接:添加链接描述
按照提示输入指令,即可。
可以看到目录下:
2. VS2019配置环境
参考文章:vmtk c++ vs2019安装过程
按照文章步骤配置包含目录,库目录,附加依赖项
配置lib文件时,快速读取文件名的代码:
#include <iostream>
#include "windows.h"
#include <string>
#include <vector>
#include <assert.h>
#include <io.h>
#include <fstream>
using namespace std;
//读取全部路径
void GetAllFormatFiles(string path, vector<string>& files, string format)
{
//文件句柄
long long hFile = 0;
//文件信息
struct _finddata_t fileinfo;
string p;
if ((hFile = _findfirst(p.assign(path).append("\\*" + format).c_str(), &fileinfo)) != -1)
{
do
{
if ((fileinfo.attrib & _A_SUBDIR))
{
if (strcmp(fileinfo.name, ".") != 0 && strcmp(fileinfo.name, "..") != 0)
{
//files.push_back(p.assign(path).append("\\").append(fileinfo.name) );
GetAllFormatFiles(p.assign(path).append("\\").append(fileinfo.name), files, format);
}
}
else
{
files.push_back(p.assign(path).append("\\").append(fileinfo.name));
}
} while (_findnext(hFile, &fileinfo) == 0);
_findclose(hFile);
}
}
//只读取文件名
void getFiles(string path, vector <string>& files)
{
long long hFile = 0;
struct _finddata_t fileinfo;
string pathp;
if ((hFile = _findfirst(pathp.assign(path).append("\\*").c_str(), &fileinfo)) != -1)
{
do
{
if ((fileinfo.attrib & _A_SUBDIR))
{
if (strcmp(fileinfo.name, ".") != 0 && strcmp(fileinfo.name, "..") != 0)
{
getFiles(pathp.assign(path).append("/").append(fileinfo.name), files);
}
}
else
{
string filestr = fileinfo.name;
files.push_back(filestr);
}
} while (_findnext(hFile, &fileinfo) == 0);
_findclose(hFile);
}
}
int main()
{
string filePath = "F:\\miniconda3\\envs\\foo\\Library\\lib";
vector<string> files;
const char* distAll = "AllFiles.txt";
//读取所有格式为txt的文件
string format = ".lib";
getFiles(filePath, files);
ofstream ofn(distAll);
int size = files.size();
ofn << size << endl;
for (int i = 0; i < size; i++)
{
ofn << files[i] << endl;
cout << files[i] << endl;
}
ofn.close();
return 0;
}
3. 测试
运行代码,
文章作者:机器人学渣
VTK(四)—VMTK血管中心线提取
报错,找不到vmtk的相关dll文件
百度如何配置dll路径,VS引用dll的目录配置
最终将F:\miniconda3\envs\foo\Library\bin目录下的所有文件复制到project下。
运行成功。
4. 问题记录:
头文件
F:\miniconda3\envs\foo\Library\include\vmtk\vtkvmtkPolyDataCenterlines.h
和
F:\miniconda3\envs\foo\Library\include\vmtk\vtkvmtkCapPolyData.h
报错“VTK_OVERRIDE”: 未知重写说明符
查看源代码,没有改动。
不知道如何解决,索性将VTK_OVERRIDE删除,竟然没有报错,不知道是什么原因。
边栏推荐
- Navicat报错:1045 -拒绝访问用户[email protected](使用passwordYES)
- Mysql common commands
- 关于 VS Code 优化启动性能的实践
- 在腾讯做外包测试的那些日子.....
- 18 years of programmer career, read more than 200 programming books, pick out some essence to share with you
- 【合集- 行业解决方案】如何搭建高性能的数据加速与数据编排平台
- MYSQL unique constraint
- 21天学习挑战赛安排
- Point Density-Aware Voxels for LiDAR 3D Object Detection 论文笔记
- MySQL数据表的基本操作和基于 MySQL数据表的基本操作的综合实例项目
猜你喜欢

区块元素、内联元素(<div>元素、span元素)

51 MCU peripherals: ADC

C语言中i++和++i在循环中的差异性

18 years of programmer career, read more than 200 programming books, pick out some essence to share with you

Matlab论文插图绘制模板第41期—气泡图(bubblechart)

How Navicat Connects to MySQL

leetcode括号匹配问题——32.最长有效括号

关于 VS Code 优化启动性能的实践

Detailed explanation of interface in Go language

Introduction to coredns
随机推荐
leetcode 665. Non-decreasing Array 非递减数列(中等)
Features and installation of non-relational database MongoDB
Redis数据库
Introduction and use of apifox (1).
【合集- 行业解决方案】如何搭建高性能的数据加速与数据编排平台
[PSQL] 窗口函数、GROUPING运算符
Google 安装印象笔记剪藏插件
制作web3d动态产品展示的优点
Constructors, member variables, local variables
Point Density-Aware Voxels for LiDAR 3D Object Detection 论文笔记
CPU使用率和负载区别及分析
说好的女程序员做测试有优势?面试十几家,被面试官虐哭~~
classSR论文阅读笔记
The company does not pay attention to software testing, and the new Ali P8 has written a test case writing specification for us
软件测试在职2年跳槽4次,你还在怪老板不给你涨薪?
C语言入门实战(13):十进制数转二进制
el-input can only input integers (including positive numbers, negative numbers, 0) or only integers (including positive numbers, negative numbers, 0) and decimals
leetcode一步解决链表合并问题
OAuth 授权协议 | 都云原生时代了,我们应该多懂一点OAuth ?
ERROR 1045 (28000) Access denied for user 'root'@'localhost'Solution