[vtkusers] problems with scalars - lookup tables.

Raja Ghanem rng at po.cwru.edu
Mon Jul 23 13:50:21 EDT 2001


Try Update() member function or AllocateScalars() prior to issuing
GetScalarRange().

Hope that works,
Raja

-----Original Message-----
From: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com]On Behalf Of ferrant
Sent: Monday, July 23, 2001 10:51 AM
To: vtkusers at public.kitware.com
Subject: [vtkusers] problems with scalars - lookup tables.


Hi,

I have some problems with the scalars associated with image data.

The pipeline is as follows :
vtkLookupTable lut
set all the range, etc.
lut Build

vtkImageMapToColors map
map SetInput grayscaleimage
map SetLUT  lut
map UpdateWholeExtent

vtkImageData newImage
newImage DeepCopy [map GetOutput]

map Delete
lut Delete

If I do a GetScalarRange on newImage after this, I (with some color luts)
get 0 0. However, when I pass it to an imageviewer for instance (or any
other filter), and if I explicitly set the window level to the level I
know, the image shows up OK.

Am I doing something wrong in this pipeline ? Why doesn't GetScalarRange
return the correct values ? Do I need to do something else than DeepCopy
to have the scalars copied correctly ?

any help would be greatly appreciated !

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



_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers





More information about the vtkusers mailing list