Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @Parameter for Mesh's #150

Closed
kephale opened this issue Nov 21, 2018 · 7 comments
Closed

Add @Parameter for Mesh's #150

kephale opened this issue Nov 21, 2018 · 7 comments
Labels
1.0.0 1.0.0 release
Milestone

Comments

@kephale
Copy link
Member

kephale commented Nov 21, 2018

No description provided.

@kephale
Copy link
Member Author

kephale commented Mar 12, 2019

@ctrueden questions about this (no rush):

  1. Do we want the widget to be a dropdown menu of all meshes available in the currently active SciView window?
  2. Would there be any obvious issues with coding this as something like MeshWidget that implements InputWidget which has an @Parameter for a SciView?
  3. What is the best existing code snippet to reference for implementation?

@imagejan
Copy link
Contributor

How about registering Meshes with the ObjectService when they're created/displayed? Then a ChoiceWidget would be created automatically (taking the toString() as a name, IIRC).

To also allow #@ Mesh in scripting, all you need is add an alias from Mesh to net.imagej.mesh.Mesh using ScriptService.addAlias()

@kephale
Copy link
Member Author

kephale commented Mar 21, 2019 via email

@kephale
Copy link
Member Author

kephale commented Apr 25, 2019

Thank you kindly @imagejan

Addressed in 90e2d52

@kephale kephale closed this as completed Apr 25, 2019
@ctrueden
Copy link
Member

Awesome, @kephale!

The only thing to watch out for is: ObjectService's index keeps hard refs, so your meshes will not be GCed unless you remove them explicitly. Maybe do that when they are removed from all scenes? You'll probably have to reference count, unfortunately.

Alternately, we could look at adding weak reference support to the object service. Let me know if that would help you.

@kephale kephale reopened this Apr 26, 2019
@kephale kephale added the 1.0.0 1.0.0 release label Jun 10, 2023
@kephale
Copy link
Member Author

kephale commented Jun 10, 2023

This one is flagged for https://github.com/scenerygraphics/sciview/issues?q=is%3Aopen+label%3A1.0.0+sort%3Aupdated-desc to check the situation w.r.t. @ctrueden's comment

@kephale
Copy link
Member Author

kephale commented Jun 14, 2023

Node deletion also removes them from the ObjectService now.

I did notice that SciView.dispose() does not use deleteNode. That is important because there may be some memory reference issues with scenery's volume manager that @moreApi mentioned in another issue, and deleteNode also handles special case cleanup for Volumes, including removal from VolumeManager. This would be addressed by #478

@kephale kephale closed this as completed Jun 14, 2023
@moreApi moreApi added this to the 1.0.0 milestone Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0.0 1.0.0 release
Projects
None yet
Development

No branches or pull requests

4 participants