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.<br><br>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.
<br><br>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.
<br><br>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..
<br clear="all"><br>-- <br>----------------------------------------<br>Randall Hand<br>Visualization Scientist<br>ERDC MSRC-ITL