Skip to content

Add OME-Zarrs to an already open BigDataViewer - #150

Open
stefanhahmann wants to merge 15 commits into
mainfrom
127-add-to-open-bdv
Open

stefanhahmann wants to merge 15 commits into
mainfrom
127-add-to-open-bdv

Conversation

@stefanhahmann

@stefanhahmann stefanhahmann commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Lets a second OME-Zarr, e.g. a segmentation, be added to a BigDataViewer window this plugin opened (part of #127):

  • Opener "BigDataViewer (add to active window)": adds to the BDV holding the active pyramidal, or opens a new one. The existing BDV opener is relabelled "BigDataViewer (new window)". A BDV window's active pyramidal now follows BDV's current source.
  • Drop onto a BDV window: files, folders and URLs dropped onto the image area are added to that window, regardless of the configured opener.
  • Several images at once (aka the "low-hanging fruit" of Open several currently open OME-Zarr images in BDV #108, no BigDataViewer change needed): "Open Current OME-Zarr Image in BigDataViewer" asks which of the open OME-Zarrs to show, like BDV's "Open Current Image", and shows the selected ones in one BDV window afterwards.
  • API: new OmeZarr.showInBdv(BdvHandle) and OmeZarrOpenActions.showInBdv(BdvHandle) (null = new window). BdvUtils' show/register methods are merged into show; showBdvAndRegisterWindow and the helpers are no longer public.
  • New Test data: bdv_testing/ with logo_spots (spots laid out like our logo, plus the Zarr wordmark) and their segmentation logo_labels (including OMERO colors and contrast limits).

BDV windows opened outside of this plugin are not covered by this PR; see the sketch in #127 and bigdataviewer/bigdataviewer-core#227.

🤖 Generated with Claude Code

@stefanhahmann stefanhahmann self-assigned this Oct 9, 2026
@stefanhahmann
stefanhahmann force-pushed the 127-add-to-open-bdv branch 7 times, most recently from acf5456 to 9211a8f Compare October 9, 2026 13:40
stefanhahmann and others added 11 commits October 12, 2026 11:48
Two 2D OME-Zarr v0.5 images with identical extents and 2 levels, to test
adding a segmentation to an already open BigDataViewer (#127): spots laid out
like the repository logo next to the Zarr wordmark, and one label per spot and
letter. OMERO metadata colors them green and magenta, showing every label.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
PyramidalBdv now knows the BdvHandle showing it and whether one of its sources
is BDV's current source. BdvUtils registers it with PyramidalService, such that a BDV window showing several pyramidals reports the selected one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
BdvUtils had four similarly named show/register methods which become one show method with an optional BDVHandle param (null handle = new window, else add to that BDV). Some helpers are no longer public. The omeroChannels
test moves to BdvUtilsTest.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adds the image to an already open BDV instead of opening a new one.
null opens a new window, and showInBdv() now delegates to it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The label "BigDataViewer" becomes "BigDataViewer (new window)", so it stays
distinguishable from an opener that adds to an open BDV. Its name
bdv-multi-resolution stays, as it is persisted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adds the image to the BDV holding the active pyramidal via
OmeZarr.showInBdv(BdvHandle), or opens a new one if there is none.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
OmeZarrOpenActions gets showInBdv(BdvHandle), mirroring OmeZarr (null opens a
new window), and showInBdv() delegates to it. Both BDV openers now go through
the class OmeZarrOpenActions (like all other openers). This allows to add UI behaviour for BDV windows in one place (#127).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Dropping files, folders or URLs onto the image area of a BDV windows that were opened through this plugin before adds them to that window, regardless of the configured opener
(#127).
OmeZarrDropListener parses them like pasted text, checks them with
isZarr and reads them with the user's settings. The reading happens in a separate thread.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
OmeZarrDropListener had no test. This one opens logo_spots with the "add to
active window" opener, drops logo_labels onto the window's real DropTarget
(only the transferable is faked) and checks that BDV then shows both.
droppedLocations is unit tested for file lists, text and unreadable drops.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Opening logo_spots and then logo_labels: "add to active window" opens a new
window only for the first and adds the second to it, while "new window" opens
one window per image.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lists the OME-Zarrs that are open, once per PyramidContents

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@stefanhahmann
stefanhahmann force-pushed the 127-add-to-open-bdv branch 2 times, most recently from d86f02b to 36e90a9 Compare October 13, 2026 12:31
A dialog to choose from a subset from a list of given OME-Zarrs based on PyramidContents

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
stefanhahmann and others added 2 commits October 13, 2026 20:57
Shows several OME-Zarrs in one new BDV window, one pyramidal each, so
callers no longer thread the BdvHandle through a loop themselves.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…OME-Zarr images at once.

The command previously opened only the active OME-Zarr. With more than one open, in ImageJ or BDV, it now asks which to show, via OmeZarrImagesChooser, and
shows them in one new BDV window, like BigDataViewer's own "Open Current Image" does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant