FZJ-INM1-BDA / siibra-python

Software interfaces for interacting with brain atlases - Python client
Apache License 2.0
48 stars 10 forks source link

Introduce merging Neuroglancer fragments #561

Closed AhmetNSimsek closed 5 months ago

AhmetNSimsek commented 7 months ago

When a map with fragmented Neuroglancer volumes is requested without specifying a fragment, the fetch fails as merging of fragments for Neuroglancer volumes was not implemented (#551). Test with:

from nilearn import plotting
import siibra
mp = siibra.get_map('cortical layers', space='bigbrain')
res = 0.64
img = mp.fetch(resolution_mm=res)
bigbrain = siibra.get_template('bigbrain').fetch(resolution_mm=res)
plotting.view_img(img, bg_img=bigbrain, cmap=mp.get_colormap(), symmetric_cmap=False)

Also, fixes voxel dimension calculation during mergin fragments of nifti volumes. (This was not a problem most of the time since the voxel size of most fragmented nifti is 1 mm)

codecov-commenter commented 7 months ago

Codecov Report

Attention: 1315 lines in your changes are missing coverage. Please review.

Comparison is base (5a0e6b3) 36.81% compared to head (9be5f5d) 53.28%. Report is 387 commits behind head on main.

Files Patch % Lines
siibra/features/feature.py 48.55% 125 Missing :warning:
siibra/volumes/volume.py 44.85% 118 Missing :warning:
siibra/core/region.py 56.75% 112 Missing :warning:
siibra/volumes/parcellationmap.py 18.97% 111 Missing :warning:
siibra/explorer/url.py 0.00% 107 Missing :warning:
...bra/features/connectivity/regional_connectivity.py 33.33% 56 Missing :warning:
siibra/retrieval/datasets.py 49.53% 54 Missing :warning:
siibra/explorer/util.py 0.00% 51 Missing :warning:
...a/features/tabular/receptor_density_fingerprint.py 4.54% 42 Missing :warning:
...a/features/tabular/regional_timeseries_activity.py 39.13% 42 Missing :warning:
... and 36 more

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #561 +/- ## =========================================== + Coverage 36.81% 53.28% +16.46% =========================================== Files 61 69 +8 Lines 5421 6645 +1224 =========================================== + Hits 1996 3541 +1545 + Misses 3425 3104 -321 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.