-
Notifications
You must be signed in to change notification settings - Fork 10
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 checkbox for load scene in memory or delayed #29
Comments
Hey I wonder if there is any news on this ? Thanks ! |
@lambda-science napari-aicsimageio/napari_aicsimageio/core.py Lines 34 to 37 in f800574
So you can use the following trick to change. In ipython or the napari console add:
I think it should work added to a script too, but I just tested ipython and napari console. |
Thanks @psobolewskiPhD! There haven't been any updates on my side. I did think about this though. It may be possible to create yet another widget that ships with napari-aicsimageio. "aicsimageio-configuration" widget or something that just handles these state management things. That widget can be loaded as a new pane in napari prior to loading a file, you can change all the settings you want there and then when you actually load a file, the "primary" widget checks the config (sort of like how we do with the scene management widget -- since we know the widget's namespace exactly -- we pull data from the widget with that namespace). If that didn't make any sense at all, please ignore me. If someone looks at this issue and comment and it made sense to them, feel free to give it a try. Would be happy to accept a PR. |
@evamaxfield totally makes sense to me. I think it would be more elegant for napari preferences to include something for plugins to use for these things, but for now a widget can work. I think the key is the settings would need to be set and then work with the widget closed when the reader actually fires. With the scene widget it's the reader that's calling the scene widget... So here we'd need global variables? or use the trick from above? Also this would probably go in a new .py, not in core.py right? Then, having the settings persist between sessions, which could be nice, could be done using https://napari.org/magicgui/api/magicgui.html |
Yea storing info in a single global would be better imo. Just one big container for all of these config options so we only need to namespace one item instead of however many config selections we want to add. I think either would work. The globals or the "namespaced widget data sharing" trick. To be honest, I have no idea where this code would live in this lib. Probably outside or core.py but if that is the easiest place to put it then fine by me too. "Whatever works" Yea the persist between sessions would be the best too. |
OK, we've got a holiday coming up so I'll try and make some proof-of-concept. |
Cool! Excited to see whatever comes out of it! (Also have a nice holiday!) |
Use Case
Please provide a use case to help us understand your request in context
Instead of having two plugin variants that the napari user has to switch between they could simply determine how they want to load it during the napari process and on a per image and per scene basis!
Solution
Please describe your ideal solution
Similar to current checkboxes implemented in #25 and #27, we would simply need to add another checkbox to store state and check before image load.
Note: like #28 this should happen after the next release and if reception is positive to making the scene selector the primary method for loading images into napari.
Alternatives
Please describe any alternatives you've considered, even if you've dismissed them
The text was updated successfully, but these errors were encountered: