[vtkusers] Large Volume Data

FICKER, MICHAEL ficmic01 at evergreen.edu
Mon Aug 5 21:18:56 EDT 2002


My data set consists of 1500 jpeg images of 2000x2000 pixels each.  I do not
intend to visualize such a large volume but I was trying to make VTK extract
and resample my Volume of Interest (VOI) and then dump this smaller volume
(aprox 150x150x150) out into a new set of jpegs.

I have had luck manipulating and visualizing smaller volumes but have been
unable to use such a large data set.  I have tried various forms of
vtkImageDataStreamer and vtkMemoryLimitImageDataStreamer.

I have been trying varios forms of the following script.  If I only procecss
~350 images it runs fine, but if I try the entire stack VTK crashes.

Time is not a concern, the script can run as long as it takes.
Any ideas on how to work with datasets this large?


# read a stack of images starting at GR0000.JPG
vtkJPEGReader reader
        reader SetFilePrefix "GR"
        reader SetDataExtent 0 2000 0 2000 0 1500
        reader SetFilePattern "%s%04d.JPG"
        reader SetDataSpacing 2 2 3
        reader SetDataScalarTypeToUnsignedShort
        reader GlobalReleaseDataFlagOn

#Stream the data to comsume less memory
vtkImageDataStreamer streamer
        streamer SetInput [reader GetOutput]
        streamer SetNumberOfStreamDivisions 32
        [streamer GetExtentTranslator] SetSplitModeToBlock
        streamer UpdateWholeExtent

# Extract and resample a sub volume from the source
vtkExtractVOI voi
        voi SetInput [streamer GetOutput]
        voi SetVOI 500 1500 400 1600 100 1400
        voi SetSampleRate 10 10 10
        [voi GetOutput] SetScalarTypeToUnsignedChar

# write out the new smaller volume
vtkJPEGWriter writer
        writer SetInput [voi GetOutput]
        writer SetFilePrefix "vol"
        writer SetFilePattern "%s%04d.jpg"
        writer SetFileDimensionality 3
        writer Write
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020805/2511612e/attachment.htm>


More information about the vtkusers mailing list