[vtkusers] LEgacy VTK File Formats

Dominik Szczerba domi at vision.ee.ethz.ch
Mon Jan 29 13:06:28 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yes, you have to, otherwise XML formats are not that difficult to
produce by your code.

- --ds

Randall Hand wrote:
> I'm working with some legacy VTK File Format stuff, writing it from
> Fortran Code.  I'm trying to write it in Binary (for Performance & Space
> reasons), but I've run into a s urprising hiccup.
> 
> The file-formats.pdf file shown on the VTK.org website says that the
> file readers can handle reading either BigEndian or LittleEndian data. 
> In reality, however, it seems that (on my X86 Little-Endian Machine,
> which is currently the predominant architecture in the Big vs Little
> Endian Architectures, right) I still have to manually byte-swap
> everything before I write it because in the readers there is a
> hard-coded call to vtkByteSwap that I seem unable to bypass.
> 
> For a test I simply wrote out (in C, with fprintf's and fwrite's) a
> simple 3-point, 1-cell Polygonal Dataset in Binary.  It segfaults
> Paraview & VTK every time I try to read it. If I byte-swap all my ints &
> floats (Point locations, point ID's, scalar data) then it works.
> 
> So I have to byte-swap all my data to write it out, then wait for VTK to
> byte-swap it again when it reads it in?  Shouldn't this be an "option",
> and not a "requirement" ?  Or have I missed something..
> 
> -- 
> ----------------------------------------
> Randall Hand
> Visualization Scientist
> ERDC MSRC-ITL
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFFvjek/EBMh9bUuzIRAhFGAJdD2jdXEpgzsfypEn53Pq8WU8E2AKDEyTmd
AtTs+LBYbb6SHkOUDJuyTA==
=h8FT
-----END PGP SIGNATURE-----



More information about the vtkusers mailing list