[vtkusers] Memory Limit while reading Rectilinear Grid

Christian Pöcher Poecher at gmx.net
Wed Oct 17 10:46:40 EDT 2001


Hi,

it looks like I ran into a memory limit while reading a VTK-datafile. The
datafile contained a 140*50*43 sized RECTILINEAR_GRID with 301000 vectors with
double presicion. Here is a sniplet from my datafile:

# vtk DataFile Version 2.0
Sample rectilinear grid
ASCII
DATASET RECTILINEAR_GRID
DIMENSIONS 140 50 43
X_COORDINATES 140 double
[snip]
Y_COORDINATES 50 double
[snip]
Z_COORDINATES 43 double
[snip]
POINT_DATA 301000
VECTORS vectors double 
[snip]

When I started a simple script to visualize a single streamline, my computer
(256MB RAM, Win2K, 4GB virtual memory) used approx. 1 minute CPU and 1GB
memory to produce an error:

vtkFloatArray: Cannot allocate memory.

But if I altered the datafile so that there are only 154800 vectors, I got
the desired result within 5 secs CPU and 45MB memory.

Therefore I guess there is a memory limit within the VTK. Is there a way to
tune VTK or the data, so the reader works with my data? Why does VTK allocate
45MB for 154800 vectors and 1GM for 301000 vectors?

TIA, Chris

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




More information about the vtkusers mailing list