[vtkusers] Not Streaming Connectivity

Kevin H. Hobbs hobbsk at ohiou.edu
Wed May 24 16:31:04 EDT 2006


After some really spectacular swap deaths, a segfault or two, and now
some obviously wrong results on test data I've come to the conclusion
that the vtkConnectivityFilter does not support streaming.

I want to extract a particular connected region containing point xyz
with values above some threshold from an image. The image and the
resulting unstructured grid are both to big to fit in memory.

I tried two basic methods. I used threshold first followed by
connectivity, or I used the scalar connectivity in the connectivity
filter. In the first case the connectivity filter gets an unstructured
grid, and in the second it gets an image. The code I used is attached.

When the connectivity filter got an unstructured grid from the threshold
filter and when I used a small number (2 - 32) of streamed pieces all
memory was consumed. When I used a large number (1024) of streamed
pieces the program immediately segfaulted.

I switched the code to how you see it attached, with scalar connectivity
on and the connectivity filter receiving image data. I got results but
they looked a little off. I switched from my gigantic full resolution
image to a low res image and I think I see what's happening, each piece
is treated as a completely new region, and the closest point is figured
out again and connectivity continues from there. The results are very
wrong. I'll post pictures when I fix my paraview build.

When I think about how hard it would be to write as a streaming filter,
my mind basically blows up. The best ideas I can think of would require
ghost cells and at least two passes through all the upstream pieces.
That is one pass to produce some sort of merge tree, and one to produce
output.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExtractSpecificRegion.cxx
Type: text/x-c++src
Size: 1433 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060524/ccb1ba9c/attachment.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060524/ccb1ba9c/attachment.pgp>


More information about the vtkusers mailing list