[vtkusers] How do I process one input at a time in MultipleInputFilter?

Jan Owoc jsowoc at gmail.com
Tue Jul 5 19:05:16 EDT 2005


I have this problem in my filter which inherits from MultipleInputFilter.

I need to take many inputs (sometimes hundreds) and produce one
output. These inputs are relatively large (100-1000MB) each, and my
machines have up to 4GB of memory, so I can only keep a few of them in
memory at any given moment.

The way the filter is implemented, I cycle through the images one at a
time with each pass not depending on the preceding or subsequent
images. ThreadedExecute does not know this and calls an "Update" on
all (sometimes 100+) input images. I don't have access to a machine
with 100GB of memory on a daily basis so the program cannot run.

Does anyone know a way I could explicitly call the update in
ThreadedExecute for one image at a time, and then free all the memory
associated with that image (and everything up the pipeline) before
updating the next image? The global release data flags only free the
data once I have read in the 100 images and calculated my output, when
it is already too late.

Jan Owoc



More information about the vtkusers mailing list