gpt4 book ai didi

c++ - 迁移到 vtk6 : Is it not necessary to Update() (anymore)?

转载 作者:太空狗 更新时间:2023-10-29 20:26:07 25 4
gpt4 key购买 nike

VTK 迁移一些代码5.10 到 6.1,我有几个这样的代码片段:

vtkSmartPointer<vtkImageData> img = vtkSmartPointer<vtkImageData>::New();
// ... initialize img somehow, e.g. copy from other image:
img->DeepCopy(otherImg);
img->SetInformation(otherImg->getInformation());
// the problematical statement:
img->Update();

在调用 Update() 时,编译器现在提示没有这样的函数(不再)。来自 VTK 的迁移站点并没有真正告诉我太多 - 我相信这属于 Removal of Data Objects’ Dependency on the Pipeline 部分,但由于没有算法填充我的图像,所以我无法调用算法更新。

自定义填充的 vtkPolyData 对象也是如此。

我现在的问题是:是否不需要(不再?)调用 Update,我可以删除它吗?或者我需要用什么来替换它?

我不得不说我是 vtk 的新手,所以如果我遗漏了一些基本简单的东西,如果你能向我指出,我会很高兴!

最佳答案

我认为您一直想对图像调用 Modified() 而不是 Update()。

关于c++ - 迁移到 vtk6 : Is it not necessary to Update() (anymore)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21186615/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com