[vtkusers] selecting scalars in vtkXMLPolyDataReader
Keyan Mehravaran
keyanm at yahoo.com
Mon Jun 30 13:32:30 EDT 2008
Hello,
I have created a vtkXMLPolyData (miraculously works in paraview), and I'm reading it vtkXMLPolyDataReader().
I feed the reader to a polydata:
PD = vtk.vtkPolyData()
PD = reader.GetOutput(),
which successfully reads the file with all the cells, points, scalars, vectors.
Now, I would like to select, say the 5th array of points, and paint it (the data are on a plane). I would highly appreciate your help in directing me towards the solution. I am attaching the output of "print PD", below.
Best Regards,
Kian Mehravaran
vtkPolyData (0x9b0280)
Debug: Off
Modified Time: 870
Reference Count: 3
Registered Events: (none)
Source: (none)
Information: 0x9b03d0
Data Released: False
Global Release Data: Off
UpdateTime: 880
Release Data: Off
UpdateExtent: Not Initialized
Update Number Of Pieces: 1
Update Piece: 0
Update Ghost Level: 0
MaximumNumberOfPieces: 1
RequestExactExtent: Off
Field Data:
Debug: Off
Modified Time: 658
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 0
Number Of Components: 0
Number Of Tuples: 0
Number Of Points: 6561
Number Of Cells: 12800
Cell Data:
Debug: Off
Modified Time: 850
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 23
Array 0 name = cellID
Array 1 name = CO2
Array 2 name = smd
Array 3 name = rho
Array 4 name = muSgs
Array 5 name = k
Array 6 name = dQ
Array 7 name = epsilon
Array 8 name = d1
Array 9 name = p
Array 10 name = d2
Array 11 name = d3
Array 12 name = kappa
Array 13 name = O2
Array 14 name = C7H16
Array 15 name = muRatio
Array 16 name = N2
Array 17 name = H2O
Array 18 name = T
Array 19 name = voidF
Array 20 name = Uavg
Array 21 name = U
Array 22 name = Udum
Number Of Components: 29
Number Of Tuples: 12800
Copy Flags: ( 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
Point Data:
Debug: Off
Modified Time: 755
Reference Count: 1
Registered Events: (none)
Number Of Arrays: 22
Array 0 name = CO2
Array 1 name = smd
Array 2 name = rho
Array 3 name = muSgs
Array 4 name = k
Array 5 name = dQ
Array 6 name = epsilon
Array 7 name = d1
Array 8 name = p
Array 9 name = d2
Array 10 name = d3
Array 11 name = kappa
Array 12 name = O2
Array 13 name = C7H16
Array 14 name = muRatio
Array 15 name = N2
Array 16 name = H2O
Array 17 name = T
Array 18 name = voidF
Array 19 name = Uavg
Array 20 name = U
Array 21 name = Udum
Number Of Components: 28
Number Of Tuples: 6561
Copy Flags: ( 1 1 1 1 1 )
Scalars: (none)
Vectors: (none)
Normals: (none)
TCoords: (none)
Tensors: (none)
Bounds:
Xmin,Xmax: (0, 0.08)
Ymin,Ymax: (-0.01, 0.01)
Zmin,Zmax: (0, 0)
Compute Time: 925
Number Of Points: 6561
Point Coordinates: 0x9c9bf0
Locator: 0
Number Of Vertices: 0
Number Of Lines: 0
Number Of Polygons: 12800
Number Of Triangle Strips: 0
Number Of Pieces: 1
Piece: 0
Ghost Level: 0
More information about the vtkusers
mailing list