VTK 5.6 to 6.1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

VTK 5.6 to 6.1

I'm converting some software from VTK 5.6 to 6.1, and the GetProducerPort() function in vtkDataObject has been deprecated.

I found details on the deprecated code and what to replace it with here:

I want to confirm that I understand the change.

Old Code:

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

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

Is this the correct change?  The reason I'm unsure is because previously we were using a vtkAlgorithmOutput as an intermediate step, and in 6.1 we have to skip that completely?