Add widget for single-channel images
- Dominant language
- Java
- Stars
- 12
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Many common image analysis workflows run on one or several selected channels of multi-channel images. Depending on the image storage format, the separate channels might exist in separate files or in a single dataset.
This makes it often necessary to split or merge channels, depending on the plugin being used and how it defines its inputs.
To allow developers to create more generic plugins, I propose to add a new widget allowing to ask specifically for single-channel images. In a script, this could e.g. look like:
```groovy
#@ Img (style="single-channel") mySingleChannelImg
```
which could be rendered in a widget like this:

All that would be needed is a new `Widget` that supports `Img` (or `Dataset`) parameters when they have the `single-channel` style annotation.
The widget could then accept both images that already have a single channel only, or -- when provided a multi-channel image -- ask for which channel index should be taken as input. (Although a nice dynamic way of changing channel choices, or disabling channel choice for single-channel images, would have to wait for https://github.com/scijava/scijava-common/issues/42#issuecomment-332658377 or similar being implemented.)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Widget implementations and the handling of Img or Dataset parameters with style annotations. Trace how a single-channel image is currently represented and how multi-channel inputs are exposed. Done means a single-channel style can accept single-channel images and lets users select a channel from multi-channel images, with the deferred dynamic behavior treated as out of scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- data, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100