[vtkusers] writing and reading with vtk
Murat Aydın
murat.aydin at netcad.com.tr
Wed Oct 21 11:30:15 EDT 2009
Hi,
I am writing vtkunsturucturedgrid to a file and then reading it.However, after reading i get nothing: number of cells , number of points all are zero.
I attached my file.
My code is :
vtk.vtkXMLUnstructuredGridWriter w = new vtk.vtkXMLUnstructuredGridWriter();
string ltempFile = System.IO.Path.GetTempFileName();
w.SetFileName(ltempFile);
w.SetDataModeToBinary();
w.SetInput(((vtk.vtkUnstructuredGrid)grid));
w.Write();
vtk.vtkXMLUnstructuredGridReader w2 = new vtk.vtkXMLUnstructuredGridReader();
w2.SetFileName(ltempFile);
w2.Update();
int num = w2.GetOutput().GetNumberOfPoints();
Kind Regards
murat aydin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091021/92b6ae24/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myFile.vtu
Type: application/octet-stream
Size: 17474 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091021/92b6ae24/attachment.obj>
More information about the vtkusers
mailing list