Open IgorTatarnikov opened 1 week ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.54%. Comparing base (
ffa996a
) to head (6a2a380
). Report is 25 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Before submitting a pull request (PR), please read the contributing guide.
Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)
Description
What is this PR
Why is this PR needed? In order to correct for brightness differences, and interpolate over the stitches in the final fused images it's important to keep track of which tiles overlap and the coordinates of the overlap in both
local
(relative to the tile itself) andglobal
(relative to the final fused image) coordinates.What does this PR do?
brainglobe_stitch/tile.py
: Introduced theOverlap
class to store and manage information about the overlap between two tiles, including methods to calculate local overlap coordinates and extract/replace overlap data.brainglobe_stitch/image_mosaic.py
: Updated theImageMosaic
class to include anoverlaps
attribute and methods to calculate overlaps between tiles. This involved modifying the constructor,load_mesospim_directory
, andstitch
methods, and adding thecalculate_overlaps
method.tests/test_unit/test_tile.py
: Added new tests for theOverlap
class, including tests for initialization, local coordinate calculation, overlap data extraction, and data replacement. These tests ensure that the overlap functionality works correctly.How has this PR been tested?
Tests added to cover the new functionality.
NOTE: To test the functionality locally you must install Fiji and also add BigStitcher to the update sites. This can be done using the GUI see here or via the command line after installing Fiji.
./ImageJ-linux64 --update add-update-sites "BigStitcherUpdate" "https://sites.imagej.net/BigStitcher/" ./ImageJ-linux64 --update update
Replace ImageJ-linux64 with the path to the local ImageJ executable.
Three different datasets are available for testing:
Is this a breaking change?
No
Does this PR require an update to the documentation?
Yes, will come in subsequent PR.
Checklist: