DGtal-team / DGtal

Digital Geometry Tools and Algorithm Library
https://dgtal.org
GNU Lesser General Public License v3.0
370 stars 115 forks source link

IO exception while reading ASCII(P2) pgm3d file #811

Closed copyme closed 10 years ago

copyme commented 10 years ago

Recently I found that PGMReader<Image>::importPGM3D throws an IO exception when reading an ASCII(P2) pgm3d file. I have written a test for this and you can find it in my repository in branch PGM_P2_BROKEN - https://github.com/copyme/DGtal/tree/PGM_P2_BROKEN

When in file in its header there is only P2 exception message says that

No P3d format in /home/kacper/Projects/DGtal/tests/samples/ascii_ball.pgm3d

But after change to P2-3D

"nbread=0

terminate called after throwing an instance of 'DGtal::IOException'

what(): DGtal IO error"

dcoeurjo commented 10 years ago

@kerautret, could you please have a look ?