Skip to content

fix: single layer ng annotation in collection results in 0 z-size bbox#1203

Merged
teo-zetta merged 1 commit intomainfrom
fix_training_collection_single_layer
Mar 23, 2026
Merged

fix: single layer ng annotation in collection results in 0 z-size bbox#1203
teo-zetta merged 1 commit intomainfrom
fix_training_collection_single_layer

Conversation

@teo-zetta
Copy link
Contributor

Using shrink mode from snapped() function reduces bbox z-size to 0. The proper way is to floor the coordinates instead and matches the way neuroglancer handles coordinates.

Background:
Coordinates are stored in units of 1nm. snapped() is normally used to align bboxes to chunks, this was repurposed to align to resolution coordinates. Using shrink would always add 1 to each coordinate when the correct behavior should be just flooring. Thus a new floor mode is added to snapped() and build_collection_dataset() is changed to use the new floor mode.

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.98%. Comparing base (13cf657) to head (6f0cf5b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1203   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         192      192           
  Lines       10203    10206    +3     
=======================================
+ Hits        10201    10204    +3     
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@teo-zetta teo-zetta requested a review from supersergiy March 23, 2026 23:02
@teo-zetta teo-zetta merged commit 1992f68 into main Mar 23, 2026
10 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.

2 participants