PLY reader fails and/or hangs when directly reading from an istream
When reading a PLY by passing in a file name,
_PLYReader_::can_u_read() gets called and initializes the options from the header. However, when reading directly from an istream,
can_u_read() does not get called, and the options are still at default values when entering
_PLYReader_::read(). Ultimately, this means that
read_ascii() will get called even for binary PLY files since the format options were never initialized from the header.
If the above operation does not hang (it often does), then reading the PLY a second time works fine, since it has now been initialized with the proper options.
My proposed fix is to take the can_u_read() block out of
_PLYReader_::read_binary() and move it to
_PLYReader_::read() (near the top, just after the
Note that the reason I am using the istream version is because OpenMesh does not have wide character support for file names (required for other languages).