当前位置:网站首页>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学习道路上遇到的一些有趣、有意义的东西记录下来,和各位交流学习,如有错误,欢迎各位大佬批评指正!
边栏推荐
猜你喜欢

Principle analysis of famous website msdn.itellyou.cn

Common JVM interview questions and answers

MySQL高级学习笔记

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

mysql password modification method in Linux (pro-test available)

带你搞懂MySQL隔离级别,两个事务同时操作同一行数据会怎样?

Gradle sync failed: Uninitialized object exists on backward branch 142

Artifact SSMwar exploded Error deploying artifact.See server log for details

Understanding of objects and functions in js

(Crypto essential dry goods) Detailed analysis of the current NFT trading markets
随机推荐
[uiautomation] Get WeChat friend list (stored in txt)
jenkins +miniprogram-ci 一键上传微信小程序
VS通过ODBC连接MYSQL(一)
On the side of Ali, tell me what are the application scenarios of message middleware you know?
Xiaomi mobile phone SMS location service activation failed
Tencent Cloud Lightweight Server deletes all firewall rules
configure:error no SDL library found
How MySQL - depots table?A look at will understand
What is the difference between NFT and digital collection?
Using IIS10 to build an asp website in win11
SSH自动重连脚本
Eternal blue bug reappears
js中的break与continue退出
VS2017连接MYSQL
纯shell实现文本替换
flutter arr 依赖
For penetration testing methods where the output point is a timestamp (take Oracle database as an example)
quick-3.6源码修改纪录
Pure shell implementation of text replacement
cocos2d-x-3.2创建项目方法