imagej / imagej/imagej-notebook
Add functionality to display ImgLabelings
- Dominant language
- Java
- Stars
- 4
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
When running e.g. `ops.run("labeling.cca", input)` in a notebook, it would be nice to have a simple way to display the resulting `ImgLabeling`. Let's add this to `DefaultNotebookService`:
```groovy
indexImage = labels.getIndexImg()
indexImage.firstElement().setReal(255.0) // hack to get full 0-255 display range
view = ij.imageDisplay().createDataView(indexImage)
view.rebuild()
lut = ij.lut().loadLUT(new File("luts/glasbey_inverted.lut"))
view.setColorTable(lut, 0)
view.rebuild()
view
```
maybe with an optional `ColorTable` input?
`display(ImgLabeling labels)`
`display(ImgLabeling labels, ColorTable lut)`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in DefaultNotebookService and inspect its existing display entry points and the ImgLabeling API used by ops.run("labeling.cca", input). Reproduce the notebook case, then verify that display(ImgLabeling) renders the label image and that the optional ColorTable overload applies the requested LUT; confirm the result interactively in a notebook.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100