当前位置:网站首页>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删除,竟然没有报错,不知道是什么原因。
边栏推荐
猜你喜欢
Stress testing and performance analysis of node projects
上海交大牵手淘宝成立媒体计算实验室:推动视频超分等关键技术发展
Features and installation of non-relational database MongoDB
navicat connects to MySQL and reports an error: 1045 - Access denied for user 'root'@'localhost' (using password YES)
家用 NAS 服务器(4)| MergerFS和SnapRaid数据定时备份
51单片机外设篇:红外通信
leetcode一步解决链表合并问题
Mysql数据库 | 基于Docker搭建Mysql-8.0以上版本主从实例实战
Matlab paper illustration drawing template No. 41 - bubble chart (bubblechart)
H5 access payment process - WeChat payment & Alipay payment
随机推荐
Navicat报错:1045 -拒绝访问用户[email protected](使用passwordYES)
[PSQL] 窗口函数、GROUPING运算符
swinIR论文阅读笔记
[C language] LeetCode26. Delete duplicates in an ordered array && LeetCode88. Merge two ordered arrays
ApiPost is really fragrant and powerful, it's time to throw away Postman and Swagger
【漫画】2021满分程序员行为对照表(最新版)
51单片机外设篇:ADC
字节面试题:如何保证缓存和数据库的一致性
What are the ways to improve software testing capabilities?After reading this article, it will take you up a notch
How H5 realizes evoking APP
TikTok平台的两种账户有什么区别?
Automated operation and maintenance tools - ansible, overview, installation, module introduction
leetcode 665. Non-decreasing Array 非递减数列(中等)
浏览器的onload事件
51单片机外设篇:红外通信
Install and use Google Chrome
在腾讯做外包测试的那些日子.....
Google notes cut hidden plug-in installation impression
如何优化OpenSumi终端性能?
ATM系统