[vtkusers] VTK 6 Migration - GetProducerPort in SetNthInputConnection replacement

Berk Geveci berk.geveci at kitware.com
Mon Jun 1 13:14:14 EDT 2015


Is this call supposed make a pipeline connection? Note that
SetNthInputConnection() makes a pipeline connection whereas SetInputData()
and variants do not. Once you figure it out, if SetInputData() is still
good, I can share a way of doing what you want. If not, this code will have
to be refactored. You can simply pass data objects if you want to connect
pipelines anymore.

Best,
-berk

On Fri, May 29, 2015 at 9:47 AM, Nicole Kovacs <nkovac2 at uwo.ca> wrote:

>  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!
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150601/a7e610a5/attachment.html>


More information about the vtkusers mailing list