[vtkusers] Attaching custom color LUTs in XML files?

Steve Juranich sjuranic at gmail.com
Wed Jul 27 18:37:17 EDT 2005


I'm trying to attach a custom color LUT to a data field in my VTK-XML
file.  What I've done before to do this is (using the Python
interface):

lut = vtk.vtkLookupTable()
points = vtk.vtkPoints()
vals = vtk.vtkFloatArray()
# Make my lut, populate the points and vals arrays here.
# ...
polydata = vtk.PolyData()
polydata.SetPoints(points)
polydata.GetPointData().SetLookupTable(lut)
# et cetera

So when I use vtkPolyDataWriter, the custom LUT comes through and is
written to the file.  But when I use a vtkXMLPolyDataWriter, it's like
the LUT is being completely ignored.  Am I missing something here, or
is this one thing where the old(?) vtk files have added value over the
XML format?

Thanks for any insight.
-- 
Steve Juranich
Tucson, AZ
USA



More information about the vtkusers mailing list