Skip to content

Fall back to one representative ROI image when a tree class has no indexed domain - #131

Merged
Robbie1977 merged 1 commit into
mainfrom
feature/roi-tree-fallback-domains
Oct 26, 2026
Merged

Robbie1977 merged 1 commit into
mainfrom
feature/roi-tree-fallback-domains

Conversation

@Robbie1977

Copy link
Copy Markdown
Contributor

Classes in the Template ROI tree with no in_register_with index (for example the merged adult mushroom body on JRC2018Unisex) previously came back with painted_domain: [], so the ROI browser showed no eye for them even though an aligned image exists.

These classes now borrow one image registered to the same template:

  1. a complete (un-sided) image if one exists;
  2. otherwise a single sided (L or R) image.

Within a tier, named-source images (e.g. BANC:) beat unlabelled legacy ones, then the lowest short_form, so the choice is deterministic. Only images with an in_register_with edge to the template's own channel are considered, and only for classes already in the tree. Entries carry fallback: true, are included in painted_domain_index, and the node tooltip says "Representative image ... (no painted domain)".

Checked live against pdb for JRC2018Unisex (VFB_00101567): adult mushroom body resolves to VFB_00108vzl (BANC:MB); 22 further regions gain one image each. Unit tests for the picker are in tests/test_roi_tree_fallback.py.

Release note: the template_roi_tree cache holds the old shape, so refresh it after release (force refresh per template, or a version bump).

…dexed domain

Classes in the Template ROI tree with no in_register_with index (for example
the merged adult mushroom body on JRC2018Unisex) now borrow a single image
registered to that template: a complete (un-sided) image if one exists, else
one sided (L or R) image. Fallback entries carry fallback: true and are
included in painted_domain_index.
@Robbie1977
Robbie1977 merged commit 6d4f997 into main Oct 26, 2026
6 checks passed
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