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

Remove Layer Selection functionality from the napari-imagej menu #102

Closed
gselzer opened this issue Sep 9, 2022 · 3 comments
Closed

Remove Layer Selection functionality from the napari-imagej menu #102

gselzer opened this issue Sep 9, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@gselzer
Copy link
Collaborator

gselzer commented Sep 9, 2022

napari-imagej provides buttons in its button menu for transferring data to and from an ImageJ2 GUI. These buttons can perform one of two actions, where the chosen action is defined via the choose_active_layer setting:

  1. Choose the active layer in napari and transfer it over to the ImageJ2 GUI, or the active window in the ImageJ2 GUI and transfer that data over to napari.
  2. Provide the user with a dialog box, prompting the selection of a layer from a drop-down list of all existing layers. The selection is what is transferred between the applications.

@ctrueden said:

Not really specific to this PR, but... has anyone actually asked for the ability to explicitly select the layer, rather than having it always be the active one? If not, I'd favor removing this feature in favor of always using the active layer. And programmatically, still allowing the layer to be specified in code. Having this option makes testing more complex, and I'm not convinced anyone will want to change this setting.

Here are my thoughts:

  • I personally prefer using the active layer, over choosing.
  • I hesitate to remove functionality that already exists. I know that Git history would make it easy to recover that functionality if we decide later that it is beneficial, but I also tend to think "if it ain't broke, don't fix it". But, at the same time, simplicity is nice, and I think now is the time to remove it if we are going to.
  • I pestered @elevans to get his opinion, and he asked me what napari's convention is for selecting a layer. Being rather out of the loop, I tend to think that it is providing that dropdown, since that is what you'd be provided if you wrapped a function asking for a Layer to magicgui. Do you have any opinions on this @tlambert03?
  • Here's one situation where I might want to use the chosen layer: it might be easier to select a layer when my napari viewer contains a lot of layers (think dozens). Instead of scrolling through the list to find the one I want, it might be faster to bring up the dropdown and use keystrokes to quickly identify the layer I want. I don't think this is a particularly compelling use case, though...

Happy to hear thoughts, as my default position is to leave it in.

@gselzer gselzer added the enhancement New feature or request label Sep 9, 2022
@gselzer gselzer added this to the 0.1.0 milestone Sep 9, 2022
@gselzer gselzer modified the milestones: 0.1.0, 1.0.0 Sep 20, 2022
@gselzer gselzer mentioned this issue Sep 27, 2022
3 tasks
@gselzer
Copy link
Collaborator Author

gselzer commented Nov 18, 2022

@ctrueden suggests:

small usability thing: I get confused about "choose active layer" because to me that sounds like a thing I should have checked when I want to choose which layer will be sent back and forth, whereas in practice it has to be unchecked for me to get a choice.

If we're going to keep this functionality, we can rename it. @ctrueden do you have naming suggestions?

@imagejan
Copy link
Member

(Disclaimer: I didn't test this functionality in napari-imagej yet, just commenting on what I read here. Sorry if this is too much of a digression.)

From a user perspective, I think it's nice to have the choice to select the input layer, but default to the currently active layer. A dropdown choice with default Use current active layer, and a list of all layers as alternative choices, would be nice (though this likely would have to be implemented on the napari/magicgui side, not in this plugin).

In ImageJ2/SciJava, we have the possibility for (single) image parameters to be filled automatically with autoFill=true (the default), or a dropdown choice of open images with autoFill=false (although a combined dropdown ["Active Image"/ any other image from the list] would also be a nice option).

Related also the (yet unsolved) discussions about being able to load inputs from a file directly, see scijava/scijava-common#380 and imagej/imagej-common#71.

@ctrueden
Copy link
Member

ctrueden commented May 3, 2023

There is enough disagreement with my position (that we should just always use the active layer, and not provide an option otherwise) that I'm going to close this. I did push a commit renaming choose_active_layer to use_active_layer, which I find less confusing.

kephale pushed a commit to kephale/napari-imagej that referenced this issue May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants