当前位置:网站首页>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删除,竟然没有报错,不知道是什么原因。
边栏推荐
- ELK log analysis system
- H5 access payment process - WeChat payment & Alipay payment
- 配合蓝牙打印的encoding-indexes.js文件内容:
- The original question on the two sides of the automatic test of the byte beating (arranged according to the recording) is real and effective 26
- 18 years of programmer career, read more than 200 programming books, pick out some essence to share with you
- 区块元素、内联元素(<div>元素、span元素)
- MySql copies data from one table to another table
- 深度学习——CNN实现MNIST手写数字的识别
- 说好的女程序员做测试有优势?面试十几家,被面试官虐哭~~
- Differences between i++ and ++i in loops in C language
猜你喜欢

MySQL数据表的基本操作和基于 MySQL数据表的基本操作的综合实例项目

Install and use Google Chrome

Use the browser's local storage to realize the function of remembering the user name
![[C language] LeetCode26. Delete duplicates in an ordered array && LeetCode88. Merge two ordered arrays](/img/eb/9b05508e88b7f17d80de2afa8c08ce.png)
[C language] LeetCode26. Delete duplicates in an ordered array && LeetCode88. Merge two ordered arrays

本周大新闻|苹果MR已进行Pre-EVT测试,Quest 2涨价100美元

Shuttle + Alluxio 加速内存Shuffle起飞

21天学习挑战赛安排

ATM系统

家用 NAS 服务器(4)| MergerFS和SnapRaid数据定时备份

Introduction to Grid Layout
随机推荐
服务器的单机防御与集群防御
51 MCU peripherals: DS18B20
Meta公司新探索 | 利用Alluxio数据缓存降低Presto延迟
复盘:图像饱和度计算公式和图像信噪(PSNR)比计算公式
How much does a test environment cost? Start with cost and efficiency
How Navicat Connects to MySQL
构造方法、成员变量、局部变量
Go language study notes - grpc serverclient protobuf Go language from scratch
golang generics
Say good woman programmers do testing have an advantage?More than a dozen interview, abuse of cry ~ ~ by the interviewer
nacos registry
leetcode一步解决链表反转问题
25K test old bird's 6-year experience in interviews, four types of companies, four types of questions...
LeetCode刷题系列 -- 10. 正则表达式匹配
提高软件测试能力的方法有哪些?看完这篇文章让你提升一个档次
apisix-Getting Started
CPU使用率和负载区别及分析
golang的time包:时间间隔格式化和秒、毫秒、纳秒等时间戳格式输出的方法
leetcode括号匹配问题——32.最长有效括号
网安学习-内网渗透4