imagej / imagej/imagej-common

Allow more flexible image input options

Open
#71 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
12
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Currently, module inputs of type `Img` (and `ImagePlus`, `Dataset`, etc. via converters) are handled by [`ObjectWidget`](https://github.com/scijava/scijava-common/blob/master/src/main/java/org/scijava/widget/ObjectWidget.java) and [`SwingObjectWidget`](https://github.com/scijava/scijava-ui-swing/blob/master/src/main/java/org/scijava/ui/swing/widget/SwingObjectWidget.java) that offer a simple `JComboBox` with a list of convertible objects.
It would be nice to offer more flexibility via a `style` attribute, to allow:
* reading images from files (`style="file"`)
* choosing from either a list of open images, or a file (`style="file-or-image"`)

Another (maybe more elegant) option would be to create a singleton object that shows up as "Load from file..." option in any dropdown list for image inputs, thereby allowing to choose an open image or load from file at will.

See https://github.com/saalfeldlab/bigwarp/issues/42#issuecomment-340198033 for the discussion that triggered this issue.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing ObjectWidget.java and SwingObjectWidget.java, then review the linked BigWarp discussion to resolve whether styles or a "Load from file..." option is preferred. Done means image inputs can select open images, files, or both according to the agreed design.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.