[vtkusers] Many fields lookup tables in a single vtk file (legacy)

Yoann GUILHEM yoann.guilhem at esrf.fr
Tue Mar 26 15:37:15 EDT 2013


Hi,

I am trying to write and read single vtk file with many cell data 
pointing to different lookup tables stored in the same file.

1) I am writing the vtk file manually with matlab, which looks like the 
one at the end of my message. At that point everything is fine, I guess.

2) Then I am reading this file via vtk python functions 
(vtkDataSetReader), but no way to get the two different lookup tables.
Only the first is read.

Did anyone succeed in such a task?
Am I doing something wrong?
Does it seems to be a bug?
Or is it impossible to do so in a legacy vtk file format?

Thanks,

Yoann

##########################################

# vtk DataFile Version 3.0
Test for lookup tables
ASCII
DATASET POLYDATA
POINTS 8 float
1.0 1.0 1.0
2.0 1.0 1.0
2.0 2.0 1.0
1.0 2.0 1.0
3.0 1.0 1.0
3.0 2.0 1.0
4.0 1.0 1.0
4.0 2.0 1.0
POLYGONS 3 15
4 0 1 2 3
4 1 4 5 2
4 4 6 7 5
CELL_DATA 3
SCALARS cellData1 int 1
LOOKUP_TABLE RedGreenBlue
1 2 3
LOOKUP_TABLE RedGreenBlue 3
1.0 0.0 0.0 1.0
0.0 1.0 0.0 1.0
0.0 0.0 1.0 1.0
SCALARS cellData2 int 1
LOOKUP_TABLE BlueGreenRed
1 2 3
LOOKUP_TABLE BlueGreenRed 3
0.0 0.0 1.0 1.0
0.0 1.0 0.0 1.0
1.0 0.0 0.0 1.0



More information about the vtkusers mailing list