[Paraview-developers] Replacement of SetInput with SetInputData (VTK5 vs. 6)

Schlottke, Michael M.Schlottke at aia.rwth-aachen.de
Mon Apr 27 01:23:35 EDT 2015


Dear all,

I’m currently in the middle of migrating a few custom plugins (mostly filters) from VTK5 to VTK6. One of the situations I’ve frequently encountered is code like this in the `RequestData` method:

vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
vtkUnstructuredGrid *input = vtkUnstructuredGrid::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
vtkCellDataToPointData * cp = vtkCellDataToPointData::New();
cp->SetInput(input);
…
cp-Update();
...

Now, according to the migration guide (http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Replacement_of_SetInput), typically I need to replace SetInput with SetInputConnection when maintaining a pipeline connection, whereas for “internal filters” usually SetInputData is the correct choice.

Now I am wondering: ifinside the RequestData method of a filter, do I *ever* need  to use SetInputConnection, and if yes, how? It seems like all filters I’ve had a look at always access the input data object (which I can only pass on using SetInputData, not SetInputConnection), not the input port. However, as a user with little VTK experience it seems like this might “break” the aforementioned pipeline? And does the presence of the call to “Update()” change anything with respect to this question?

Regards,

Michael


--
Michael Schlottke

Chair of Fluid Mechanics and Institute of Aerodynamics
RWTH Aachen University
Wüllnerstraße 5a
52062 Aachen
Germany

Phone: +49 (241) 80 95188
Fax: +49 (241) 80 92257
Mail: m.schlottke at aia.rwth-aachen.de<mailto:m.schlottke at aia.rwth-aachen.de>
Web: http://www.aia.rwth-aachen.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20150427/d97aca4f/attachment.html>


More information about the Paraview-developers mailing list