PDA

View Full Version : Select point clouds using a cube



Anna1994
5th February 2019, 14:04
I currently have a code where I can import a point cloud, select a specific area via pcl::visualization::AreaPickingEvent and crop that area out. So far I am selecting the area via VTK rubberband feature (triggered by x or X). However, instead of having a rectangular shape to select the points, I would like to have a cube that would select only the points inside the cube. I am currently using QT, C++, VTK and PCL. Is there any QT function that would do that?

In Summary:

What I have now: trigger x, drag a rectangle, crop the area (with the entire depth)

What I want: drag a cube shape, select the area inside the cube, crop that area out

d_stranz
5th February 2019, 17:14
I am not aware of anything in Qt that supports 3D data in the way you are displaying it. Qt uses either a scene model (Qt3D) or an extremely inflexible graphics library (Qt Data Visualization), neither of which is suitable.

You would be better off asking on the VTK forum. I would be surprised if VTK did not have some means of volume selection, but then the user interaction could be very tricky - it's easy to select a rectangle, but then how do you indicate the depth of the selection at the same time? Possibly you'll need an extra bit to indicate that the next movement is depth - like pressing a shift key or the like.