[vtkusers] Creating an algorithm with a variable number of output ports

Jeff Baumes jeff.baumes at kitware.com
Wed Nov 17 21:09:39 EST 2010


I don't believe you can make output ports repeatable, just input ports. What
you may want to look at using a single vtkMultiBlockDataSet as your output
type, which is essentially a vector of vtkDataObjects (like vtkTable). That
way, all of your outputs can be on one port. If you need to pick off single
vtkTables from the output to use downstream, I believe you can use one or
more instances of the vtkExtractBlock filter.

Jeff

On Wed, Nov 17, 2010 at 6:33 PM, Ben Medina <ben.medina at gmail.com> wrote:

> Hello all,
>
> I want to create an algorithm that:
> - takes as input a single vtkTable
> - outputs multiple tables, where each table contains all rows from the
> original table that have the same value for a particular column.
>
> I don't see anything that does exactly this, so I believe I need to
> write my own algorithm. I have a couple of questions:
>
> 1) Can an algorithm change its number of output ports during its
> lifetime? In my case, the number of output tables depends entirely on
> the input table, which is not known at construction and could
> potentially change at any time. Perhaps I should be using a repeatable
> output port?
>
> 2) If so, is there an example available to show how this is done?
>
> Thanks,
> Ben
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101117/a2dabdb3/attachment.htm>


More information about the vtkusers mailing list