siibra-python icon indicating copy to clipboard operation
siibra-python copied to clipboard

[discussion?][bug?] statistical map does not have the correct header

Open xgui3783 opened this issue 3 years ago • 1 comments

full disclosure, this is a data issue. But this needs to be addressed at some point (siibra-python/siibra-api/siibra-explorer)

I raise the problem here, since it's closest to the source (everything else is downstream).

as of b881335f36ed06c302007c5ff7963af7426c4a4a

code to reproduce:

import siibra
jba_stat_map = siibra.get_map("2.9", "mni152")
image = jba_stat_map.fetch("hoc1 left")
image.get_header("xyzt_units")

expected output

("mm", "sec")

actual output

(unknown, unknown)

Why is this a problem

This is a problem because undefined voxel units leave the implementation of the unit to the library/viewer:

  • In nilearn, where the default unit is mm, the nifti works (or fails silently, if you choose to look at it that way).
  • in Neuroglancer, default unit is nm, and it fails

Course of action

  • [ ] fix the data upstream
  • [ ] on getting an nibabel image, check xyzt_unit. If unset, set to mm, sec on either:
    • [ ] siibra-python
    • [ ] siibra-api
    • [ ] siibra-explorer

xgui3783 avatar Feb 16 '23 09:02 xgui3783

updated code

as of 7ae55aac4e74c72c6c56afb3a1b04a69947863c9

import siibra
jba_stat_map = siibra.get_map("2.9", "mni152", "statistical")
image = jba_stat_map.fetch("hoc1 left")
image.header.get_xyzt_units()

AhmetNSimsek avatar Mar 21 '24 10:03 AhmetNSimsek