[vtkusers] vtkAppendPolyData RemoveInputData leads to 0 connections

Schober Beatrix [STEMMER IMAGING GmbH] b.schober at stemmer-imaging.de
Wed Jan 25 08:43:06 EST 2017


Hi,

it seems to be an easy issue, but I don't get the solution. I am appending multiple vtkPolyData to vtkAppendPolyData:

vtkSmartPointer<vtkAppendPolyData> appendFilter = vtkSmartPointer<vtkAppendPolyData>::New();
appendFilter->AddInputData(polyData1);
appendFilter->AddInputData(polyData2);

In another functions I want to hide / show those polydata:

Function to hide:
appendFilter->RemoveInputData(polyDataX);
appendFilter->Update();

Function to show:
appendFilter->AddInputData(polyDataX);
appendFilter->Update();

This works fine, unless I have only one polydata in the vtkAppendPolyData filter. If I hide (see Function to hide) this last polydata I get following error after appendFilter->Update():
Input port 0 of algorithm vtkAppendPolyData has 0 connections.

The error message is clear, but how would you solve this? Is there a better way to do that?

Thank you very much in advance!

Sincerely,

Bea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170125/e823c8c9/attachment.html>


More information about the vtkusers mailing list