tiagodc / TreeLS

R functions for processing individual tree TLS point clouds
GNU General Public License v3.0
82 stars 27 forks source link

Change number colour in 3D plot - map.pick method #29

Closed npuletti closed 3 years ago

npuletti commented 3 years ago

Dear all, I'm trying TreeMap function with map.pick method. somenthing like treeMap(tls, map.pick(min_h = 1, max_h = 5)) When I right-click over a trunk, a number in black appears. The background is in black too and such configuration is not suitable to check the status of trunk selection. Can I set a different colour for tree-id numbers (e.g. Yellow)?

Thanks

tiagodc commented 3 years ago

Thanks for the comment!

The black number that appears after the click is the row number of the closest point, so the number itself is not useful whatsoever. I just wrapped rgl::identify3d inside map.pick, and unfortunately I can't change the label styling inside of it. I'll consider refactoring that function to improve interactivity though.

Cheers

spokswinski commented 3 years ago

We have also used this function after the map.hough function to pick up trees missed in messy point clouds. Rather than change the color of the ID numbers, it would be easier to change the background color of the rgl instance. Especially since the points are variously colored already. I tried adding rgl::bg3d('gray50') but since the rgl instance is opened in the function and then the picking, it changes the background after the picking is done. If this command was wrapped in the map.pick function after the rgl was called, it might work.

tiagodc commented 3 years ago

fair enough. I'll add a parameter to select the background color then. Thanks @spokswinski