nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
637 stars 295 forks source link

Volume timing metadata missing from BOLD series #2193

Closed effigies closed 4 years ago

effigies commented 4 years ago

What version of fMRIPrep are you using?

20.1.0

What kind of installation are you using? Containers (Singularity, Docker), or "bare-metal"?

Singularity

[snip irrelevant bits]

Summary

RepetitionTime metadata is not associated with CIFTI-2 outputs. VolumeTiming and DelayTime metadata is not carried through from the original data for NIfTI files. There is no metadata for GIFTI files.

mgxd commented 4 years ago

re: CIFTI TR, you should be able to get what you want by:

import nibabel as nb
ci = nb.load(<img>)
ci.header.matrix.get_index_map(0).series_step

https://github.com/nipreps/niworkflows/blob/bb44cd72ced0fa51d3e2f44d99f29bb5e61233d6/niworkflows/interfaces/cifti.py#L425

bpinsard commented 4 years ago

Fitlins/pybids.analysis.Analysis crashes when not finding that information in the json.

KeyError: "Metadata term 'RepetitionTime' unavailable for file ....../hcptrt/derivatives/fmriprep-20.1.0/fmriprep/sub-01/ses-002/func/sub-01_ses-002_task-emotion_run-1_space-fsLR_den-
91k_bold.dtseries.nii."

I am not sure if fitlins is able to handle CIFTI-2 though.

effigies commented 4 years ago

There will be some extremely preliminary CIFTI support in tomorrow's release.

oesteban commented 4 years ago

What's the state of affairs here?

effigies commented 4 years ago

I don't think anything has been done. Looking at our test outputs from 20.2.0rc2, there are still no JSON files for GIFTI. We don't have any CIFTI-2 to check, but I think I recall there being a question of whether it should be .dtseries.json or just .json that wasn't resolved. I doubt we're pulling forward VolumeTiming, DelayTime or AcquisitionDuration.