[vtkusers] reading a vtu file with vtkXMLUnstructuredGridReader
Murat Aydın
murat.aydin at netcad.com.tr
Mon Dec 7 04:31:37 EST 2009
Hi,
How can i prevent generating CellData and PointData XML elements?
Should i manually delete CellData and PointData XML elements?
Kind Regards
murat
----- Original Message -----
From: Murat Aydın
To: vtkusers at vtk.org
Sent: Monday, December 07, 2009 10:40 AM
Subject: reading a vtu file with vtkXMLUnstructuredGridReader
Hi,
I am writing a vtkUnstructuredGrid to a vtu file with the following code:
vtk.vtkXMLUnstructuredGridWriter w = new vtk.vtkXMLUnstructuredGridWriter();
string ltempFile = filePath;
w.SetFileName(ltempFile);
w.SetDataModeToBinary();
w.SetInput(((vtk.vtkUnstructuredGrid)block));
w.write();
The generated vtu file is in attachments.
Then i read it with:
vtk.vtkXMLUnstructuredGridReader w2 = new vtk.vtkXMLUnstructuredGridReader();
w2.SetFileName(filePath);
w2.Update();
But the output data has no cells,no points etc..
When i delete the PointData and CellData XML elements, i can read the file succesfully.
Am i missing something in reading or writing ?
Kind Regards,
murat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091207/7743affb/attachment.htm>
More information about the vtkusers
mailing list