[vtk-developers] Deprecated GetProducerPort

Berk Geveci berk.geveci at kitware.com
Wed Oct 22 13:32:31 EDT 2014


vtkAlgorithm* pAlgorithm = aTexture->GetInputAlgorithm();

-berk


On Wed, Oct 22, 2014 at 12:53 PM, filez41 <tom.valleau at gmail.com> wrote:

> Hey all, I posted this a week ago but in the email blast the code was left
> out.  I'm hoping including the code and rephrasing the question will help.
>
> I'm upgrading some code from 5.6 to 6.1, and the GetProducerPort has been
> deprecated.  We were using it in a few places, and I've been trying to
> repeat the results we were getting with 5.6 following this deprecated code
> guide:
> http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Removal_of_GetProducerPort
> It hasn't been helpful because that's not how it was being used.
>
> Old Code:
>         vtkImageData * pImageData = aTexture->GetImageDataInput(0);
>         vtkAlgorithmOutput * pAlgorithmOutput =
> pImageData->GetProducerPort();
>         vtkAlgorithm * pAlgorithm = pAlgorithmOutput->GetProducer()
>
> New Code (*not working*):
>         vtkImageData * pImageData = aTexture->GetImageDataInput(0);
>         vtkAlgorithm * pAlgorithm = vtkAlgorithm::New();
>         pAlgorithm->SetInputDataObject(pImageData);
>
> Reading the code more closely I can understand why the attempted code is
> not
> working, but I can't figure out how to replicate the old results without
> that function.
>
> The goal is to get a vtkAlgorithm out of a vtkDataObject (in this case a
> vtkImageData).  Before we were getting the producer port (a
> vtkAlgorithmOutput) and passing it's producer off to a vtkAlgorithm.
>
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Deprecated-GetProducerPort-tp5729205.html
> Sent from the VTK - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20141022/26135174/attachment-0002.html>


More information about the vtk-developers mailing list