[vtkusers] vtkDataSetReader Problem
Yang, Faguo
Faguo.Yang at STJUDE.ORG
Tue Jan 6 00:43:10 EST 2009
Dear Guys,
Your help to solve the following problem is higly appreciated:
I am sure that in the test.vtk (an unstructuredGrid) file have the scalar data as follows:
POINT_DATA 40000
SCALARS mesh_node_data float
LOOKUP_TABLE default
39.162 39.183 39.2042 39.2256 39.2473 39.2691 39.2912 39.3135 39.3361
39.3588 39.3818 39.3549 39.2831 39.2114 39.1398 39.0683 38.9969 38.9256
38.8544 38.7833 38.7123 38.6415 38.5707 38.5 38.4295 38.359 38.2887 ...
And try to use the following code to read the data:
vtkDataSetReader* reader = vtkDataSetReader::New();
reader->SetFileName("test.vtk");
reader -> Update();
vtkUnstructuredGrid *pGrid = dynamic_cast<vtkUnstructuredGrid*>(reader->GetOutput());
vtkDataArray *pTemp = pGrid -> GetPointData() -> GetScalars();
however, pTemp always to be NULL.
Anyone can help to find out what is the problem?
Thanks a lot!
yang
Email Disclaimer: www.stjude.org/emaildisclaimer
More information about the vtkusers
mailing list