[vtkusers] VTK 6 Migration - GetProducerPort in SetNthInputConnection replacement

Nicole Kovacs nkovac2 at uwo.ca
Fri May 29 09:47:53 EDT 2015


Hi guys,


I apologize if this is a basic question, I'm new to VTK and I'm trying to port some VTK code from version 5.x to version 6.x


I'm facing various errors regarding GetProducerPort's removal from vtkDataObject. I know that I should be replacing someAlgorithm->SetInputConnection(someDataObject->GetProducerPort());
by someAlgorithm->SetInputData(someDataObject);


but the code I have is a bit different, such as:
someAlgorithm->SetNthInputConnection(port, index, someDataObject->GetProducerPort());


I thought about looking for some SetNthInputData method that takes as arguments a port and an index and could solve my problem, but haven't found anything that useful. I did find a method called SetInputDataObject(int port, vtkDataObject *data) that has the port, but not the index.


Is there a way that I can port this part of my code? Is there a reason that SetInputData methods don't have indices as arguments?


I have talked to the author of the code I'm porting and I know that in some cases I don't need to specify the port, only the input index. Is there a method that does that?


Thank you for your attention!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150529/426f7a94/attachment.html>


More information about the vtkusers mailing list