[vtkusers] writing and reading with vtk

Murat Aydın murat.aydin at netcad.com.tr
Thu Oct 22 09:20:15 EDT 2009


Hi,

You are right, i did what you have said (deleted pointdata and celldata XML elements) and it worked. Then is it a VTK bug?  Or should i do something extra when writing or reading file (my code is wrong?)?
Thanks for your help.

murat aydin
  ----- Original Message ----- 
  From: Jérôme 
  To: Murat Aydın 
  Cc: vtkusers at vtk.org 
  Sent: Thursday, October 22, 2009 3:47 PM
  Subject: Re: [vtkusers] writing and reading with vtk


  Hi,
  I just looked at your file: It seems that you have an empty PointData field, as well as empty CellData. If you delete these XML elements (PointData and CellData), your geometry is successfully read (sort of 3 merged boxes, isn't it?)

  My advice is to check how your data are written.

  'Hope that helps,
  Jerome


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

    Hi,

    I am sending ascii version of the file. Thanks for your interest.

    Kind Regards
    murat aydin
      ----- Original Message ----- 
      From: Jérôme 
      To: Murat Aydın 
      Cc: vtkusers at vtk.org 
      Sent: Thursday, October 22, 2009 12:23 PM
      Subject: Re: [vtkusers] writing and reading with vtk


      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 
          To: Murat Aydın 
          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





    _______________________________________________
    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/45302ccc/attachment.htm>


More information about the vtkusers mailing list