Skip to content

Batch roi export tags - #235

Merged
will-moore merged 12 commits into
ome:developfrom
will-moore:batch_roi_export_tags
Oct 23, 2026
Merged

will-moore merged 12 commits into
ome:developfrom
will-moore:batch_roi_export_tags

Conversation

@will-moore

@will-moore will-moore commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Fixes #234 and also adds support for exporting ROI Tags.

To test:

  • Run Batch_ROI_Export script with default parameters (e.g. just run it on a single Image - quicker):
    • Only a single channel is exported (instead of multiple channels)
    • We don't export Points Coords by default
  • Run with Export ROI Tags checkbox checked
    • ROI Tags column should be included with Tag text values separated by commas
Screenshot 2026-10-09 at 08 37 14

@will-moore

will-moore commented Oct 8, 2026 •

Copy link
Copy Markdown
Member Author

Test at test/integration/test_export_scripts.py::TestExportScripts::test_batch_roi_export[True] FAILED [ 59%]
is failing above because the csv.writer writes csv files with an extra row compared with the manual csv writing we had before.

        row_count = 1 + size_c + polygon_planes
>       assert len(csv_text.split("\n")) == row_count
E       assert 6 == 5

@will-moore
will-moore requested a review from pwalczysko October 9, 2026 09:41
@will-moore

Copy link
Copy Markdown
Member Author

@pwalczysko Good images for testing are in the dataset at https://merge-ci.openmicroscopy.org/web/webclient/?show=dataset-569
Just choose a single image to run the script.

@will-moore
will-moore force-pushed the batch_roi_export_tags branch from 99bbfc3 to 5be8d63 Compare October 9, 2026 12:53
@pwalczysko

pwalczysko commented Oct 12, 2026 •

Copy link
Copy Markdown
Member
  • Only a single channel is exported (instead of multiple channels)

Yes, wfm. But, now, I would like to export all channels. Pretty confused about how to do it. Which checkbox to check ?

Screenshot 2026-10-12 at 14 01 07

Edit: I know the answer now, and this is from long past memory. One has to enter 1,2,3 into the Channels textfield... Which worked. But I would still say an obvious RFE is "Export all channels" (wording does not matter much) checkbox

@will-moore
will-moore force-pushed the batch_roi_export_tags branch from 41117bc to ae62cff Compare October 13, 2026 13:31
@will-moore

will-moore commented Oct 13, 2026 •

Copy link
Copy Markdown
Member Author

Updated script parameters to give a new Pixel Intensity Stats option. The default is None - in which case we don't include stats. This is much faster. e.g testing with a Dataset containing 7 images and 500 ROIs, took 0.5 seconds with None whereas choosing Selected Channels and just channel 1 took 17 secs (as printed in logging to stdout).

Screenshot 2026-10-13 at 14 38 25

@will-moore will-moore mentioned this pull request Oct 14, 2026
3 of 4 tasks
@pwalczysko

Copy link
Copy Markdown
Member

aha, so you returned the Channel 1,2,3 filled in by default (i.e. by default all channels get exported) which fixes my comment #235 (comment) and compensated for the lost time by not doing the stats by default if I get it right @will-moore ? Thank you

@pwalczysko

pwalczysko commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

bug (possibly in omero-biofilefinder) ? but reporting here:

Going through the workflow of adding Tags in iviewer to ROIs I added newly 3 tags:

  • Dead
  • Nice Cel
  • Ben's Tag

I have run this script on them then and created on the Dataset a new CSV. The CSV when inspected in Excel lgtm, the Ben's tag row does not seem extraordinary in comparison with the Dead rows. But the Ben's tag ultimately does not load in BFF, see screenshot below.

Screenshot 2026-10-20 at 19 45 42

another case with different server (outreach) crashes on date (Uploaded)

Screenshot 2026-10-21 at 10 15 11

@will-moore

Copy link
Copy Markdown
Member Author

aha, so you returned the Channel 1,2,3 filled in by default (i.e. by default all channels get exported) which fixes my comment #235 (comment) and compensated for the lost time by not doing the stats by default if I get it right @will-moore ? Thank you

No. By default Pixel Intensity Stats: None -> no pixel intensity stats are exported.
If you choose Pixel Intensity Stats: All Channels -> then pixel intensity stats exported for all channels
if you choose Pixel Intensity Stats: Selected Channels (enter below) then the 1,2,3 Channels will get stats exported, or different Channels if you edit it.

@will-moore

Copy link
Copy Markdown
Member Author

Don't know what's going on in BFF error there

@pwalczysko

Copy link
Copy Markdown
Member

Don't know what's going on in BFF error there

It is the apostrophy:
Proof: I have removed the apostrophy (Ben's -> Bens), saved the CSV again, uploaded it to the Dataset as ...noapo.csv and started BFF. See below, it works

Screenshot 2026-10-21 at 10 42 35

@pwalczysko pwalczysko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am approving this as it works fine. The issue with BFF not taking apostrophy, and, more importantly claiming some valid dates to be invalid, how do we solve it ? Maybe opening an issue at BFF ? @will-moore

@will-moore
will-moore merged commit 636540e into ome:develop Oct 23, 2026
1 check passed
@will-moore

Copy link
Copy Markdown
Member Author

@pwalczysko I tested latest BFF and it handles apostrophes just fine. So then I decided to try and upgrade the BFF we ship in omero-biofilefinder at ome/omero-biofilefinder#18 but having some issues (see PR).

@pwalczysko

Copy link
Copy Markdown
Member

@pwalczysko I tested latest BFF and it handles apostrophes just fine. So then I decided to try and upgrade the BFF we ship in omero-biofilefinder at ome/omero-biofilefinder#18 but having some issues (see PR).

Thank you. If in deep weeds, please do not hesitate to revert. imho, this is a very annoying bug, but NOT a blocker.

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.

Batch ROI Export - export less by default

2 participants