vtkPolyDataConnectivityFilter (or vtkConnectivityFilter) might work depending on your data - there is an option for point seeded regions. However if I remember correctly, these extract connected “regions” not necessarily just the cells connected to specific points. So you might have to combine this with the ScalarConnectivity option, and set the ScalarRange of the seed points in an appropriate range.
Thanks Will. I think these filters require you to add one seed ata time too and since I’m working in Python and have a lot of seeds I’m keen to avoid this approach.
I think I’m going to try getting the CellLinks from the poly and see if I can wrangle these into numpy or pandas.
It does seem like it would be a useful method to add though. Maybe I’ll give it a go - although I’m struggling to find the time
You can add multiple seeds prior to filter execution. But using scalars to control extraction of cells is admittedly a bit obscure. It would be useful to create an extraction filter that outputs cells connected to specified points, I’m actually quite surprised that one doesn’t already exist, but I sure can’t find it
Yes - you can add multiple seeds but you have to add them one at a time instead of a list/array . No ‘AddSeeds()’ method.
Despite the fact I’m using Python, I am very performance sensitive
Yes - I was surprised that there wasn’t already a filter. As it turns out, I no longer need this capability - at least for the moment. Figured out better overall solution to my proble.
Will - Turns out you can do this using the selection classes. The hidden gem is the last line of this block.
I can’t actually find this documented anywhere, BUT, there is an example which I just converted to Python and sucesfully tested