[vtkusers] vtkPLYReader and endianness for Linux (Intel)

Pieper, Chris cpieper at kcc.com
Wed Jan 2 15:55:43 EST 2002


Vtk list:

I am trying to work with the new vtkPLYReader.  I will admit immediately
that I barely know what I'm talking about regarding endianness, so forgive
any misuse of terminology, I hope I can convey my point...

I have some binary PLY files that were created on a machine of (apparently)
opposite endianness from that of the Intel processor I'm running Linux (RH
7.1) on.  I believe I have found through a lot of trial and error that I
need to check the endianness of my machine to determine whether or not byte
swapping is necessary.  Even though the endianness is included in the header
of the PLY file, I think the additional check (to check the hardware reading
the file) is still required.

The symptom that I see when I read and immediately write out a PLY file is
that the vertex coordinates are bogus (like 1.0 e-47 for example) -- this is
the same symptom that led me to play with byteswapping in the past (before
the vtkPLYReader).

Has anyone else experienced this?  I would appreciate any help you could
offer.

Thanks,

Chris Pieper

------------------------------------------------------------------------------
This e-mail is intended for the use of the addressee(s) only and may contain privileged, confidential, or proprietary information that is exempt from disclosure under law.  If you have received this message in error, please inform us promptly by reply e-mail, then delete the e-mail and destroy any printed copy.   Thank you.

==============================================================================



More information about the vtkusers mailing list