[Paraview] can't create a valid vti file to read into paraview

Moreland, Kenneth kmorel at sandia.gov
Mon Jul 27 12:57:26 EDT 2009


You should always be able to create a valid vti file by simply loading or creating image data in ParaView (the Wavelet source works well for that), and then writing out a vti file.

If you want further help on what is wrong with your file, it would be helpful to post it.  You might also consider contacting the vtk users mailing list too, since the VTK file formats is more of general VTK question.

-Ken


On 7/24/09 1:33 PM, "Lawrence M. Lifshitz" <Lawrence.Lifshitz at umassmed.edu> wrote:

Hi,
  I am trying to write a simple program to convert my image data into vti
format so I can view it using paraview.  I've been using http://www.vtk.org/VTK/img/file-formats.pdf
as I guide.  But I keep getting an error message when I try to read in the file I create.


ERROR: In /builddir/build/BUILD/ParaView-3.4.0/VTK/IO/vtkXMLStructuredDataReader.cxx, line 326

vtkXMLImageDataReader (0x10844640): Error reading extent 0 511 0 511 0 40 from piece 0

ERROR: In /builddir/build/BUILD/ParaView-3.4.0/VTK/IO/vtkXMLDataReader.cxx, line 502

vtkXMLImageDataReader (0x10844640): Cannot read point data array "i2idata" from PointData in piece 0. The data array in the element may be too short.

When I actually count the bytes in the file they seem correct (i.e, 512*512*41*2,   2 since I'm using Int16 and raw data).

I went to the archives and found http://www.cmake.org/pipermail/paraview/2008-June/008319.html which discussed a
similar issue and has a link to a "valid" vti file (I don't have any other to test with)
http://www.paraview.org/pipermail/paraview/attachments/20080611/e2bbb33b/attachment.obj

(don't know why the extension wasn't .vti).
I pulled that over and can read it fine (at least there are no error messages, I don't know what the image is supposed to look like).

Looking at that file it seems to me like there are too many bytes in the raw data, since it seems like it should be 8*4*4 = 128 * 4 bytes per point = 512.
In the archived article it makes it sound like maybe there are extra bytes of info needed (???) :

> To discover (for it was undocumented) that a 4 byte number of elements
> should precede each record and should be a BIG ENDIAN integer regardless of
> the endianness of rest of the binary data was quite a thrill (to say the
> least!).

or maybe some type of byte alignment issue?

I too am on 64 bit Linux (fedora 11), but I'm compiling 32 bit.  I am using the "encoding="raw" attribute, but using Int16 data.

Thanks for any pointers to how to create these files!

                           Larry



   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090727/ab2228f0/attachment.htm>


More information about the ParaView mailing list