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

Lawrence M. Lifshitz Lawrence.Lifshitz at umassmed.edu
Fri Jul 24 15:33:37 EDT 2009


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


/

-- 
Lawrence M. Lifshitz, Ph. D., Associate Professorf
Biomedical Imaging Group (http://invitro.umassmed.edu)
University of Massachusetts Medical School (http://www.umassmed.edu)
Phone: (508) 856-3392   email: Lawrence.Lifshitz at umassmed.edu
Fax:   (508) 856-1840     web: http://invitro.umassmed.edu/lml

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


More information about the ParaView mailing list