[Paraview] windows build can not read appended image (VTI) data

Server Levent Yilmaz leventyilmaz at gmail.com
Wed Jun 11 17:23:41 EDT 2008


On Wed, Jun 11, 2008 at 10:32 AM, Brad King <brad.king at kitware.com> wrote:

> > Brad King wrote:
> >> Server Levent Yilmaz wrote:
> >>> 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!).
> >> Where did you see this?  It's most certainly wrong.
>

Most cetainly... I haven't seen it anywhere. As I said it was a trial and
error procedure for me to figure this out and I stopped trying when it
worked as some point (although it didn't make sense). And as you indicated,
I just got lucky on 64bit Linux. I still haven't got the slightest idea why
it works.


>
> >> The byte order of
> >> the count should match that specified by the "byte_order" attribute of
> >> the VTKFile element.  I see that the files you posted are using big
> >> endian order for that number even though the file says they are
> >> LittleEndian.  It's just luck that the file reads anywhere.
>
Writing with anything but the VTK-provided writer was not a design goal.
>  That's it's not really documented.  It's also why we provide C, C++,
> and Fortran interfaces to the writer so that people can link to VTK
> instead of using their own home-grown writers.


Point taken. However, what we intended here was just a simple dirty solution
and VTI raw binary seems plain enough to implement without resorting to high
level library calls. There is hardly any need to grow anything at home, but
dump a couple lines of text and the binary data. All I strove to find out
was a proper specification of the binary format.  Although it was apparently
not a design goal, VTK User's guide already documents the data formats in
detail; however omits to mention this 4-byte thingy, and look where we ended
up :)


>
> >
> > Oh, and FYI the count should not be the number of elements, it should be
> > the number of *bytes* in the array (before base-64 encoding if that is
> > done).
>
> I've written a brief wiki page describing the binary format:
>
>  http://www.vtk.org/Wiki/VTK_XML_Formats


Thanks Brad. Much needed indeed. All I needed to know was what that magic
word is supposed to be. I am indebted for your guidance on the matter.

sorry for the noise,

Levent



-- 
Server Levent Yilmaz
Mechanical Engineering
University of Pittsburgh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20080611/e78ba679/attachment.htm>


More information about the ParaView mailing list