<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
I am trying to write a simple program to convert my image data into
vti<br>
format so I can view it using paraview. I've been using
<a class="moz-txt-link-freetext" href="http://www.vtk.org/VTK/img/file-formats.pdf">http://www.vtk.org/VTK/img/file-formats.pdf</a><br>
as I guide. But I keep getting an error message when I try to read in
the file I create.<br>
<br>
<meta name="qrichtext" content="1">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin: 0px; text-indent: 0px;"><!--StartFragment--><span
style="font-family: 'Courier'; font-size: 12pt; color: rgb(128, 0, 0);">ERROR:
In
/builddir/build/BUILD/ParaView-3.4.0/VTK/IO/vtkXMLStructuredDataReader.cxx,
line 326</span></p>
<p style="margin: 0px; text-indent: 0px;"><span
style="font-family: 'Courier'; font-size: 12pt; color: rgb(128, 0, 0);">vtkXMLImageDataReader
(0x10844640): Error reading extent 0 511 0 511 0 40 from piece 0</span></p>
<p
style="margin: 0px; text-indent: 0px; font-family: 'Courier'; font-size: 12pt; color: rgb(128, 0, 0);"></p>
<p
style="margin: 0px; text-indent: 0px; font-family: 'Courier'; font-size: 12pt; color: rgb(128, 0, 0);"></p>
<p style="margin: 0px; text-indent: 0px;"><span
style="font-family: 'Courier'; font-size: 12pt; color: rgb(128, 0, 0);">ERROR:
In /builddir/build/BUILD/ParaView-3.4.0/VTK/IO/vtkXMLDataReader.cxx,
line 502</span></p>
<p style="margin: 0px; text-indent: 0px;"><span
style="font-family: 'Courier'; font-size: 12pt; color: rgb(128, 0, 0);">vtkXMLImageDataReader
(0x10844640): Cannot read point data array "i2idata" from PointData in
piece 0. The data array in the element may be too short.</span><!--EndFragment--></p>
<br>
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).<br>
<br>
I went to the archives and found
<a class="moz-txt-link-freetext" href="http://www.cmake.org/pipermail/paraview/2008-June/008319.html">http://www.cmake.org/pipermail/paraview/2008-June/008319.html</a> which
discussed a<br>
similar issue and has a link to a "valid" vti file (I don't have any
other to test with)<br>
<pre><a
href="http://www.paraview.org/pipermail/paraview/attachments/20080611/e2bbb33b/attachment.obj">http://www.paraview.org/pipermail/paraview/attachments/20080611/e2bbb33b/attachment.obj</a>
(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 (???) :
</pre>
<pre>><i> To discover (for it was undocumented) that a 4 byte number of elements
</i>><i> should precede each record and should be a BIG ENDIAN integer regardless of
</i>><i> the endianness of rest of the binary data was quite a thrill (to say the
</i>><i> 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
</i></pre>
<pre class="moz-signature" cols="120">--
Lawrence M. Lifshitz, Ph. D., Associate Professorf
Biomedical Imaging Group (<a class="moz-txt-link-freetext" href="http://invitro.umassmed.edu">http://invitro.umassmed.edu</a>)
University of Massachusetts Medical School (<a class="moz-txt-link-freetext" href="http://www.umassmed.edu">http://www.umassmed.edu</a>)
Phone: (508) 856-3392 email: <a class="moz-txt-link-abbreviated" href="mailto:Lawrence.Lifshitz@umassmed.edu">Lawrence.Lifshitz@umassmed.edu</a>
Fax: (508) 856-1840 web: <a class="moz-txt-link-freetext" href="http://invitro.umassmed.edu/lml">http://invitro.umassmed.edu/lml</a>
</pre>
</body>
</html>