Pergunta

Migrating some code from VTK 5.10 to 6.1, I have several code pieces like this:

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();

At the call to Update(), the compiler now complains that there isn't such a function (anymore). The migration site from VTK doesn't really tell me too much about that - I believe this falls into the section Removal of Data Objects’ Dependency on the Pipeline , but as it's no Algorithm which is filling my image, I can't call update on an algorithm.

Similar goes for custom-filled vtkPolyData objects.

My question now is: Is the call to Update not necessary (anymore?), can I just remove it? Or by what would I need to replace it?

I have to say I'm relatively new to vtk, so if there's something fundamentally simple that I'm missing I'd be glad if you could point it out to me!

Foi útil?

Solução 2

Apparently they already answered your question on VTK: http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Removal_of_Update

Outras dicas

I think you've been meaning to call Modified() on your image rather than Update().

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top