Correctly handle units in all interfaces #786
Labels
effort: medium
Estimated medium effort task
help wanted
impact: low
Estimated low impact task
refactoring
Milestone
Many of our interfaces that use
img.header.get_zooms()
assume mm+s units, rather than checkingget_xyzt_units()
, while the NIfTI standard also allows for meters, microns, milliseconds and microseconds. There will eventually be a dataset where this bites us, so we should try to address this before it becomes a real issue.In the short term, it may make sense to create a helper function that takes an image and returns zooms in mm+s, and just call that instead of
img.header.get_zooms()
(not sure if this belongs more in fmriprep or niworkflows).In the long term, I've proposed a new method on NIfTI headers that always returns mm+s (nipy/nibabel#567). We can use that as a template for a
get_norm_zooms(img)
function.The text was updated successfully, but these errors were encountered: