[vtkusers] vtkPLYReader can not handle big endian files ?

Pieper, Chris cpieper at kcc.com
Thu Feb 7 12:37:30 EST 2002


I have seen this problem in the past too and raised it to the mailing list.
I believe the issue revolves around the hardware platform the code is
running on versus the platform the binary file was written.  The
vtkPLYReader does check for endianness as indicated in the file header, but
it needs to perform an additional step to see whether or not byte-swapping
is necessary to correctly interpret what has been read.  
 
I wish I was good at coding, but I'm not... I did find a work around in my
own PLY reader where I do a check to see if byte-swapping is required.  I
sent the code snippet to Kitware and got a response from Will indicating
that he would implement the change to the PLYReader code.  I don't know what
kind of timing Will has in mind but I'm anxious to see it come too.
 
I wish I could help, but I'm not a programmer...
 
Chris

-----Original Message-----
From: Joris Vanden Wyngaerd
[mailto:Joris.VandenWyngaerd at esat.kuleuven.ac.be] 
Sent: Thursday, February 07, 2002 10:26 AM
To: 'Vtk Mailinglist'
Subject: [vtkusers] vtkPLYReader can not handle big endian files ?


I just upgraded to vtk 4.0 and wanted to try out the vtkPLYReader
Some files it read ok, others it did not. Could it be that the problem is
that it does not handle correctly file written in big endian ?
 
I put an example file at
ftp://scully.esat.kuleuven.ac.be/joris/temp/test.ply
<ftp://scully.esat.kuleuven.ac.be/joris/temp/test.ply> 
 
the first face read has point indices 0x0, 0xc8000000, 0x01000000 where it
should be 9,200,1 (0x0,0xc8,0x1) so i think it is an endian problem.
 

================
Joris Vanden Wyngaerd 
coordinates : http://www.esat.kuleuven.ac.be/~joris/personalia.html
<http://www.esat.kuleuven.ac.be/~joris/personalia.html> 
 
"Quand les degoûtés s'en vont il ne restent que les degoûtants"
 


------------------------------------------------------------------------------
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.

==============================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020207/a4e5e4aa/attachment.htm>


More information about the vtkusers mailing list