Closed Antzyx closed 2 months ago
Hey, thanks for reporting this! This should be absolutely something easily done within py4dgeo
and I will bring it up at the next developer meeting. Here is my analysis of what happens:
epoch.cloud = ...
does not throw an error, it leaves the Epoch
object in an unusable state, as we require point clouds to be continuous in memory. The checks regarding that are in __init__
, rather than a setter for .epoch
, that is why you do not run through that code path. This should be fixed.downsampled = py4dgeo.Epoch(epoch.cloud[indices])
To conclude, I think two things should be done:
downsample
method would be a good solution, that handles the downsampling of all relevant data.cloud
and friends should be properties that cannot be set to prevent the errors you ran into.Thank you for your answer. For now, then, I will go with downsampled = py4dgeo.Epoch(epoch.cloud[indices])
which is much more convenient :)
I will keep this open as a reminder to properly address this.
@Antzyx This can now (on main
) also be achieved as epoch[indices]
which returns exactly what py4dgeo.Epoch(epoch.cloud[indices])
did, but also normals and additional dimensions are handled correctly.
Hello. Thank you very much for your work on this package.
I tried to perform what I assume to be a common operation : I wanted to run icp_with_stable_areas on a point cloud and ran out of memory, so I wanted to downsample my epoch. Here is what I had to do :
I am not sure if I missed some feature which would have allowed me to do this faster, but this looks like an overly complicated way of downsampling an Epoch. I tried simply
epoch.cloud = epoch.cloud[indices]
but this creates a segmentation error. Here are some suggestions to support this at different levels :Keep up the good work and thank you again !