Closed cmadjar closed 4 years ago
I can find no documentation regarding what values are valid for time_units in the NIFTI library...
After falling down the terrifying rabbithole that is the NIFTI1 library... https://github.com/NIFTI-Imaging/nifti_clib/blob/9659cbecc827e15c07ccc1a03023e8c348aa14fe/nifti2/nifti1.h#L1329-L1333
We need
nim->time_units = NIFTI_UNITS_SEC ;
Or similar set.
Need to find the docs on the units inside MINC.
There is a units specification for dimensions:
time:units = "s"
However,
s - String that specifies the units of a dimension, if applicable. The units should be compatible with the UCAR udunits library. In MINC 2.0, this attribute is generally included for informational purposes only and is not interpreted by the MINC library code.
So we either assume seconds, or use this to check and set appropriately on conversion.
This issue was indeed resolved by the fix. Sorry, I forgot to update and close the issue...
the
time_units
header field in the NIfTI file is populated to unknown for functional datasets. This causes issues when validating NIfTI files through the BIDS validator where we get the following error:Output of
fslhd
: