Skip to content

Keep coordinates in pixel units - #262

Open
AnniekStok wants to merge 6 commits into
mainfrom
fix_geff_scaling
Open

Keep coordinates in pixel units#262
AnniekStok wants to merge 6 commits into
mainfrom
fix_geff_scaling

Conversation

@AnniekStok

Copy link
Copy Markdown
Collaborator

Scale world coordinates to pixel coordinates when exporting to geff, and scale back at import to align with the geff spec, as a potential solution for #261

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.84%. Comparing base (d9d83ea) to head (b229feb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #262      +/-   ##
==========================================
- Coverage   93.86%   93.84%   -0.02%     
==========================================
  Files          59       59              
  Lines        3358     3398      +40     
==========================================
+ Hits         3152     3189      +37     
- Misses        206      209       +3     

☔ View full report in Codecov by Harness.
📢 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.

@cmalinmayor

Copy link
Copy Markdown
Contributor

Design decision: segmentation shape and voxel size should be stored in tracksdata for in-graph segmentations, and thus saved in the geff. External segmentations should have the same metadata in their appropriate file format standards.

Aciton item for now: Always show the scale widget pre-filled with whatever metadata is present, and let the user change it during import if needed. Might need a slight hack for our internal save/load to ignore the scale for now.

Ideally, later: we should save in world coordiantes (no axis scales), and save the segmentation metadata in tracksdata (blocked by this not existing in tracksdata for voxel size yet).

@AnniekStok AnniekStok changed the title Store coordinates as unscaled pixel coordinates + scaling factor when exporting to geff Keep pixel coordinates Aug 21, 2026
@AnniekStok AnniekStok changed the title Keep pixel coordinates Keep coordinates in pixel units Aug 21, 2026
@AnniekStok

AnniekStok commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator Author

As per our final decision in #261, this is now keeping the coordinates in pixel units.
All regionprops features are scaled by tracks.scale.
Technically the centroid is also a regionprops feature, but it is now the only one that is not scaled. The scaling is applied in motile tracker when passing the locations to the solver and in the tree view and table view.
To not lose the scaling information, it is exported as columns in the CSV file. If we want we can also try to prefill the scaling when we import by looking for those column names.

I did not update the tests_old, so the tests are still expected to fail.

@AnniekStok
AnniekStok marked this pull request as ready for review August 25, 2026 12:21
@TeunHuijben

Copy link
Copy Markdown
Collaborator

Once we agree to merge this, we should wait for #267, which makes this PR easier

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.

3 participants