[vtkusers] Streaming Pipeline

Kevin H. Hobbs hobbsk at ohiou.edu
Thu Mar 19 05:43:48 EDT 2009


Mark Bolstad wrote:
> Hello list,
>
> Can someone look at this simple pipeline and explain if I'm using the 
> StreamingPipeline correctly? It's operating on a set of 6k x 6k 
> images, but any large image set would work. I would expect that the 
> streamer would help reduce the memory usage, but I'm blowing the 
> memory on my mac no matter how I set it,

I'm very confused by that code, but it looks like you are trying to load 
a series of images, combine them into a volume, and have the whole thing 
colorized. Is that correct?

I can not see any sink (a writer or a renderer) for these data.

It looks like you are trying to stream the reading of each piece.

Typically slice readers (like .png and .jpeg) can not read any less than 
one slice at a time.

When asked for part of a slice they read the whole thing and throw out 
the extra.

I find it's best to save streaming until the very end so that as much of 
the pipeline as possible is streamed. If you can use a streamed writer 
at the end of the pipeline, then it's possible to avoid EVER loading 
even one copy of a whole volume.

The png reader can do the appending of many slices on it's own all you 
have to do is give it the file pattern and I think the number of slices.

Why doesn't your pipeline look like this?

    vtkPNGReader -> vtkLookupTable -> vtkImageDataStreamer

This pipeline could require as little RAM as the final volume plus a few 
slices.

If you want to write the colorized volume to disk in say vti format your 
pipeline could look like this:

    vtkPNGReader -> vtkLookupTable -> vtkXMLImageDataWriter

and use as little RAM as one slice plus a few pieces of one slice.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090319/fe81b74c/attachment.pgp>


More information about the vtkusers mailing list