c++ - 我尝试在 linuxLite 上使用 qt creator 运行 qt-vtk-project

标签 c++ qt ubuntu-14.04 vtk

当我尝试构建 VTK 项目时,它向我显示此错误:

class 'vtkTexture' has no member named 'SetInput' texture->SetInput(imgRedear->GetOutput());

代码:

vtkTexture* ManipFile3D::plaquageTexture(QString nameTex)
{
    vtkBMPReader* imgRedear = vtkBMPReader::New();
    imgRedear->SetFileName(nameTex);
    imgRedear->ReleaseDataFlagOn();
    imgRedear->Update();
    vtkTexture* texture = vtkTexture::New();
    texture->SetInput(imgRedear->GetOutput());
    texture->InterpolateOn();
    texture->ReleaseDataFlagOn();
    return texture;
 }

最佳答案

看来您正在使用 vtk 6(需要 SetInputData)和为 vtk 5(使用 SetInput)编写的代码。参见 vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput

关于c++ - 我尝试在 linuxLite 上使用 qt creator 运行 qt-vtk-project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28585408/

相关文章:

c++ - 从 C++ 获取 QML Editbox 的值

c++ - Qt Creator 没有名为 stackedWidget 的成员

c++ - 具有初始值的类构造

c++ - 没有调用 sqrt 的匹配函数

c++ - 有谁知道我是否可以使用 CImg 和 C++ 在图像窗口上绘图?

c++ - 使用现代 C++ 在 Eigen3 矩阵上使用 for 循环进行元素运算的优雅方式

c++ - 错误 : definition of implicitly declared copy constructor

crash - Android Studio 卡住

java - org.hibernate.internal.util.config.ConfigurationException : Could not locate cfg. xml 资源 [/HibernateTest/src/hibernate.cfg.xml]

Ubuntu:大型 syslog 和 kern.log 文件