specifying vertex color
Kirt Schaper
kirt at pet.med.va.gov
Wed May 3 09:37:15 EDT 2000
I'm struggling with specifying the color of vertices from a vtkPolyData
object. I can achieve grayscale, and I can achieve a hue specification,
but I'd like to minimally control both hue and saturation (or R/G/B).
I've tried to specify a lookup table with an entry for each point
(ala $VTK_DATA/polyEx.vtk) but this seems to be ignored -- at least
on my system (vtk 3.1, RedHat 6.1 Linux on Intel, Mesa graphics),
$VTK_TCL/../graphics/examplesTcl/polyEx.tcl shows up in grayscale.
(This is a simple example program supplied with VTK which renders an
8 point, 6 face cube -- specified with a LookupTable with different
colors for each vertex.)
I can achive a hue specification by following the lead of
$VTK_TCL/../graphics/examplesTcl/scalarMapping.tcl and specifying
a vtkProgrammableAttributeDataFilter with the ExecuteMethod set to a
procedure which resets the PointData scalars (of the PolyData)
to reflect the desired hue (from 0.0 to 1.0).
Can someone supply a simple script which shows how to specify the
R/G/B value (or H/S/L) for each vertex in a PolyData rendering?
Thanks in advance.
----------------------------------------------------------
Kirt Schaper | Bell: (612) 725-2000 x4791
PET Center (11P) | net: kirt at pet.med.va.gov
VA Medical Center | FAX: (612) 725-2068
MPLS, MN 55417 | URL: http://pet.med.va.gov:8080
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------
More information about the vtkusers
mailing list