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: [email protected]
Fax:   (508) 856-1840     web: http://invitro.umassmed.edu/lml

_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to