当前位置:网站首页>VTK:Could not locate vtkTextRenderer object.
VTK:Could not locate vtkTextRenderer object.
2022-07-31 05:15:00 【龙虾在剥我的壳】
VTK修炼笔记—报错: Could not locate vtkTextRenderer object.
一.问题描述
当我在进行图片处理时,需要获取图片像素位置。运行项目,发现只有图片,没有相关文字信息,并且报了以下错误:Could not locate vtkTextRenderer object.

此时图中并没有我想要的像素地址。
二、解决思路
根据报的错误分析,此问题并不是代码类、语法或者逻辑上的问题,而是缺少了东西,查了资料并思考了一下应该是缺失一些初始化的头文件而导致的错误,需要在main函数中先添加初始化头文件。
三、解决方案
在头文件加入:
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingFreeType)

成功解决!
今天开始,我会把VTK学习道路上遇到的一些有趣、有意义的东西记录下来,和各位交流学习,如有错误,欢迎各位大佬批评指正!
边栏推荐
猜你喜欢

Hyper-V新建虚拟机注意事项

qt:cannot open C:\Users\某某某\AppData\Local\Temp\main.obj.15576.16.jom for write

flutter arr dependencies
![[JVM Loading]---Class Loading Mechanism](/img/b6/d1754cb6699d18602ca9a463571c0c.png)
[JVM Loading]---Class Loading Mechanism

常见JVM面试题及答案整理

MySQL compressed package installation, fool teaching

Why does read in bash need to cooperate with while to read the contents of /dev/stdin

unicloud 发布后小程序提示连接本地调试服务失败,请检查客户端是否和主机在同一局域网下

Year-end summary - the years are quiet~

The feign call fails, JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
随机推荐
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
【云原生】微服务Nacos的简单介绍与使用
纯shell实现文本替换
MySQL高级语句(一)
UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装
360 加固 file path not exists.
The feign call fails, JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
cocos2d-x-3.2图片灰化效果
VS通过ODBC连接MYSQL(二)
[swagger close] The production environment closes the swagger method
cocos2d-x-3.2 Physics
MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
TransactionTemplate 事务编程式写法
UiBot has an open Microsoft Edge browser and cannot perform the installation
cocos create EditBox 输入文字被刘海屏遮挡修改
Understanding of js arrays
MySql to create data tables
cocos2d-x 实现跨平台的目录遍历
Powershell中UTF-8环境中文乱码解决办法
js中的this指向与原型对象