[vtkusers] writing and reading with vtk

Jérôme jerome.velut at gmail.com
Thu Oct 22 05:23:33 EDT 2009


Hi,
You should send an ASCII version of your file, in order to check the
validity of the values you wrote. For what I can see in you XML vtu, your
PointData array named "scalars_" range from 1 to 1. Moreover, I felt
surprised to find a mixture of binary data in an XML ascii file... But maybe
someone else could give more precision on that.

Best regards,
Jerome

2009/10/22 Murat Aydın <murat.aydin at netcad.com.tr>

>  Hi,
>
> my vtkunstructuredgrid contains only vtkPointData in which there is only a
> vtkBitArray and all values are 0 or 1.0. There is no other fields.
>
> Kind Regards
>
> murat aydin
>
> ----- Original Message -----
> *From:* Jérôme <jerome.velut at gmail.com>
> *To:* Murat Aydın <murat.aydin at netcad.com.tr>
> *Cc:* vtkusers at vtk.org
> *Sent:* Thursday, October 22, 2009 8:50 AM
> *Subject:* Re: [vtkusers] writing and reading with vtk
>
> 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
>>>
>>>
>>
>
> _______________________________________________
> 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/c6a4395f/attachment.htm>


More information about the vtkusers mailing list