[vtk-developers] Deprecated GetProducerPort

filez41 tom.valleau at gmail.com
Wed Oct 22 12:53:23 EDT 2014

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
It hasn't been helpful because that's not how it was being used. 

Old Code: 
        vtkImageData * pImageData = aTexture->GetImageDataInput(0);
        vtkAlgorithmOutput * pAlgorithmOutput =
        vtkAlgorithm * pAlgorithm = pAlgorithmOutput->GetProducer()

New Code (*not working*): 
        vtkImageData * pImageData = aTexture->GetImageDataInput(0);
        vtkAlgorithm * pAlgorithm = vtkAlgorithm::New();

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.

More information about the vtk-developers mailing list