natverse / nat

NeuroAnatomy Toolbox: An R package for the (3D) visualisation and analysis of biological image data, especially tracings of single neurons.
https://natverse.org/nat/
64 stars 29 forks source link

Change rgl.* calls to *3d #508

Closed dmurdoch closed 1 year ago

dmurdoch commented 1 year ago

Some upcoming changes to the rgl package will require changes to nat. I will be deprecating a number of rgl.* function calls. You can read about the issues here:

https://dmurdoch.github.io/rgl/articles/deprecation.html

I have made the required changes in the attached patches.

Duncan Murdoch

jefferis commented 1 year ago

Dear @dmurdoch, many thanks for this. Do we need to change e.g.

https://github.com/natverse/nat/blob/master/R/neuronlist_interactive_3d.R#L197-L198

        sapply(pl, rgl.pop, type='shape')
        sapply(more_rgl_ids, rgl.pop, type='shape')

as well?

dmurdoch commented 1 year ago

rgl.pop is not being deprecated because it is identical to pop3d. I've generally been suggesting that change because rgl.pop won't show up in the help index for rgl, but you won't get warnings or errors for it. Not sure why I didn't do it in this PR. Been sending out a lot of them...

jefferis commented 1 year ago

Thanks for clarifying! If you looked for someting rgl.pop( you wouldn't find this as I used sapply here.

jefferis commented 1 year ago

remaining errors seem to be due to old versions of alphashape3d

jefferis commented 1 year ago

Thanks for the PR @dmurdoch. I will be submitting an update to CRAN shortly.