[vtkusers] Multiple input data in custom vtkPolydataFilter
BBerco
bebe0705 at colorado.edu
Wed Jun 27 12:59:50 EDT 2018
Hello all,
I'm working on a filter that produces luminosity curves from shape models.
I'm trying to extend its capability to the case of multiple-body systems,
for instance that of a binary asteroid featuring a primary around which
orbits a secondary object.
To this end, I would need to allow my filter (inheriting from
vtkPolyDataAlgorithm) to take in multiple polydata inputs (one for each
body, with the first one being the primary, the second one the secondary (if
any),...).
I naively tried
*
myfilter-> SetInputData(0,primary_polydata)
myfilter-> SetInputData(1,secondary_polydata)
*
but the method which I think should return the number of inputs
(GetNumberOfInputPorts()) still returns 1. Obviously I'm being confused
between the number of inputs and the number of input ports.
This example
<https://www.vtk.org/Wiki/VTK/Examples/Cxx/Developers/MultipleInputPorts>
presents another approach that is not as flexible as I would like because it
relies on* SetInputConnection* and not * SetInputData*.
Any advice?
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list