[vtkusers] writing and reading with vtk
Jérôme
jerome.velut at gmail.com
Thu Oct 22 01:50:01 EDT 2009
Oops, keyboard mistake... Let's go on:
Replacing it by valid values fix my problem.
HTH,
Jerome
2009/10/22 Jérôme <jerome.velut at gmail.com>
> Hi,
> I got such a problem, that comes from some -1.#IND or (Not-a-Number, or
> NaN) values in the fields. Replit by hand with a valid value
>
> 2009/10/21 Murat Aydın <murat.aydin at netcad.com.tr>
>
>> 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
>>
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091022/d2270f91/attachment.htm>
More information about the vtkusers
mailing list