Closed Nicholas-Autio-Mitchell closed 2 years ago
I guess that the main issue here would be that pyntcloud
could be potentially reading/writing PLY files that are not valid in any other point cloud software (or at least not those following the official PLY specification).
Probably using npz
format would be the way to go when looking for full NumPy
compatibility.
You could also just add an argument like allow_extra_types
with the default to False. The joys of python :)
The reason I requested this is because I have see bool values inside PLY files, which didn't come from pyntcloud. On 9 Nov 2021, 16:01 +0100, David de la Iglesia Castro @.***>, wrote:
I guess that the main issue here would be that pyntcloud could be potentially reading/writing PLY files that are not valid in any other point cloud software (or at least not those following the official PLY specification). Probably using npz format would be the way to go when looking for full NumPy compatibility. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
@daavoo - if you don't want to include this feature (behind a flag or otherwise), shall we close this issue?
@daavoo - if you don't want to include this feature (behind a flag or otherwise), shall we close this issue?
I have no strong opinion @Nicholas-Mitchell . If someone sends P.R. and makes sense, (i.e. doesn't break default behavior) I would happily merge
@daavoo I have opened a PR: https://github.com/daavoo/pyntcloud/pull/321
Will close this issue and continue any discussion in the PR.
Is your feature request related to a problem? Please describe.
PyntCloud.from_file()
fails if the PLY contains abool
type, which occurs here inio/ply.py
.This is because there is no mapping for
bool
types in theply_dtypes
dictionary:The mapping of
'?'
tobool
is shown here under "one-character strings".Example:
Describe alternatives you've considered Finding an alternative to using
pyntcloud
for PLY files 🤷Additional context
bool
is a known type for NumPy of course, so it makes sense to support it, as the basic form ofPyntCloud
objects holdsnp.ndarray
s. It is not specifically mentioned in the original PLY specification (as far as I can see), but supporting PLY files that containbool
fields wouldn't break anything from a user's perspective.