Skip to content

wip: roi-less bins - #541

Open
mike-kaimika wants to merge 3 commits into
refactor-accession-syncfrom
roi-less-bins
Open

wip: roi-less bins#541
mike-kaimika wants to merge 3 commits into
refactor-accession-syncfrom
roi-less-bins

Conversation

@mike-kaimika

Copy link
Copy Markdown
Collaborator

No description provided.

@mike-kaimika

Copy link
Copy Markdown
Collaborator Author

@joefutrelle This draft PR adds support for handling ROI-less bins during accession and within the UI. During accession, ROI-less bins are now added, though the PR is a draft due to issues within pyifcb (see below). On the UI side, there's a new message field on datasets to allow you to customize the message for when the bin is missing ROIs. This will surface to the user if there's a dataset available (e.g., not going directly to the bin) and if there is no message, it will fallback to the original message we had, "Image data not accessible"

image image

The issues with pyifcb are due to bin.fileset.getsize() method, which assumes there will be ROIs included. When they are no present, it throws an exception. It likely needs to handle the file not being present, and just return a size of 0 bytes. I don't think it'd be correct to catch this exception on the IFCB Dashboard side, since then you won't get any of the sizes (and some of the validation/QC logic in the dashboard will fail)

Method in pyifcb
https://github.com/joefutrelle/pyifcb/blob/55d0a8ea14da1de3f0c7b8d3435e8bc3d0d9c79c/ifcb/data/files.py#L76

The four areas in the draft PR currently commented out to allow the functionality to work, which prevent validation/QC from running

Once pyifcb is updated, we'll need some minor tweaks to this PR to handle the differences, but otherwise this feature should be good to go after that

@joefutrelle

Copy link
Copy Markdown
Contributor

@mike-kaimika pyifcb 1.3.3 contains the getsizes fix

@joefutrelle

Copy link
Copy Markdown
Contributor

@mike-kaimika you'll need to uncomment the lines that were commented out because of the getsizes fix not being available, and move the dep to pyifcb >=1.3.3

@mike-kaimika mike-kaimika added this to the 5.3 milestone Aug 27, 2026
@mike-kaimika
mike-kaimika force-pushed the refactor-accession-sync branch from cd2d8c5 to a80053c Compare August 28, 2026 16:26
@mike-kaimika
mike-kaimika marked this pull request as ready for review August 30, 2026 22:56
@mike-kaimika

Copy link
Copy Markdown
Collaborator Author

@joefutrelle I've made the final updates now that the pyifcb library has been updated (which is one of the commits on this PR). Everything is now working as expected, but I am a bit unsure of the check_no_rois() metho inside of qaqc.py. I'm not sure why its checking the file sizes of the .hdr and .adc files based on the name. The only thing its used for is to set a flag on the bin, but that flag isn't actually used anywhere else in the application, so it's not breaking things. Shouldn't it only need to check the file size of the ROI file to determine if there are ROIs?

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.

2 participants