[vtkusers] vtkDataReader

Michael Bonner bonner10 at llnl.gov
Wed May 7 13:26:31 EDT 2003


VTK Users:

I am having some problems reading a vtk formatted data file. The file 
consists of unstructured data, scalars, and field data. I would like to get 
a vtkFieldData object from the file. I had to change "FIELD" (which agrees 
with File Formats for VTK Version 4.2, which I found through a previous 
posting on the mailing list) to "fielddata" in order for 
vtkDataReader::GetFieldDataNameInFile() to return the field data name. It 
is unclear to me how I can use the vtkDataReader class to get the field 
data in the file into a vtkFieldData object. If I set the field data name 
and use vtkDataReader::ReadFieldData() the application produces a seg. 
fault. How is ReadFieldData used? Is it the data reader owners 
responsibility to advance the vtkDataReader istream to the point in the 
file where "FIELD/fielddata" is the next string to be read? I have 
successfully used the SCALARS in the file, and I did not do anything except 
use vtkDataReader::SetScalarsName. Is their a similar way to specify a 
field in field data to use for point or cell data?

Ultimately I would like to use one of the fields in the field data to use 
for color mapping of the unstructured grid.I would really appreciate it if 
someone would take the time to explain how someone would do this.

Thank you for your time,
Mike Bonner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030507/e02376c7/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkReaderTest.cpp
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030507/e02376c7/attachment.txt>


More information about the vtkusers mailing list