[vtkusers] Scalar Range problem

Matthieu Ferrant ferrant at tele.ucl.ac.be
Thu Jul 19 05:39:08 EDT 2001


Hi,

I am encountering an unwanted behavior of GetScalarRange on
vtkImageData.

When I read in imagedata and call an update so the entire image is in
memory, GetScalarRange performs normally. After having used the
imageData for some other viewing purposes as input to other filters,
GetScalarRange fails and outputs a different scalar range ...

To check what was going on at the level of the scalars associated to the
image, I added a print in the ComputeRange method of vtkScalars to
output the number of scalars at each call :
- first call (after imageReader update) : 126976 (normal : 64*64*31
voxels)
- second call (no other calls, no modifications to image ,it has just
been passed as input to other filters) : 1984 (31*64, just a slice), so
it seems it has computed the scalar range on a slice the image viewer
used before the call to ComputeRange. Apparently, the entire image does
not stay in memory, because when I call GetActualMemorySize it goes down
from 127 kbytes to 2kbytes, which is the size of a slice.

How can I prevent this from happening, and keep the entire image stored
in memory so that if I call GetScalarRange, it keeps giving me the same
range ?

Thanks,

matt


-- 
M.Ferrant, Ph.D.
UCL/TELE Room A-157 Place du Levant, 2 B-1348LLN - Belgium
Tel. +32-10-478073 Fax. : +32-10-472089
http://www.tele.ucl.ac.be/MEMBERS/Ferrant_Matthieu_e.html




More information about the vtkusers mailing list