[vtkusers] scalar data in vtk xml unstructured grid file format

Andre Phillion andre.phillion at epfl.ch
Wed Apr 2 10:29:13 EDT 2008


Hello,

 

I am trying to access field data in an xml unstructured grid file. However,
it appears that the reader is not importing the field data.

 

My XML file:

<?xml version="1.0"?> <VTKFile type="UnstructuredGrid" version="0.1"
byte_order="LittleEndian" compressor="vtkZLibDataCompressor">

<UnstructuredGrid> <Piece NumberOfPoints="1316" NumberOfCells="5936">

<CellData Scalars="FractionSolid">

<DataArray type="Float32" Name="FractionSolid" format="ascii">


..

 

But when I try 

reader->SetFileName("/home/andre/Modeling/3D-GranSolidif/results/100gr-d100u
m-96fs-40.000000sec-CONN.vtu");

data = reader->GetOutput();

data->Update();

field = data->GetFieldData();

attributes = field->GetArrayName(0);

 

There is no output, i.e. arrayname does not contain ‘’FractionSolid”. I have
also tried other methods, but I’ve repeatedly gotten the error ‘has no
member name 
”

 

Help!

 

André

 

Dr. André Phillion

Laboratoire de Simulation des Matériaux
Ecole Polytechnique Fédérale de Lausanne

MXG-318, Station 12, CH-1015, Switzerland 

Tel / Fax: +41(21)693 3942 / 5890

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080402/0f1b76f4/attachment.htm>


More information about the vtkusers mailing list