[vtk-developers] Intersecting tables
Timothy Shead
tshead at sandia.gov
Tue Oct 12 11:29:38 EDT 2010
On 10/12/10 8:25 AM, Kerr, Robert wrote:
> I have a table, one column of which has the name “foo” which consists of
> a random set of numbers e.g. {1, 2, 3, 6, 7, 45, 344, etc.}.
>
> I have another table (call it the selection), which has one column,
> whose entries are a subset of “foo” e.g. {1, 7, 344}.
>
> Is there a quick and easy way to get the rows corresponding to the
> selection? I know I can loop through one table and check for existence
> in the other table, but perhaps that’s already been written somewhere
> and I’m just too dense to find it.
Bob:
If your selection was encoded as a vtkSelection, your could use
vtkExtractSelectedRows. If you don't want to turn your second table
into a vtkSelection, use vtkBasicProgrammableFilter to implement the
loop instead. The work is roughly the same either way.
Cheers,
Tim
--
Timothy M. Shead
Sandia National Laboratories
1424, Data Analysis and Visualization
More information about the vtk-developers
mailing list