Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Conversion with mri_ext: nifti does not yield any json files and ignores metadata #15

Open
rscgh opened this issue Jan 19, 2021 · 0 comments

Comments

@rscgh
Copy link

rscgh commented Jan 19, 2021

Hi,

I was just trying to convert a dataset consisting out of only nifiti files and I realized that when I converted them using a config like this:

options:
    mri_ext: nifti 
...
func:
    metadata:
      RepetitionTime: 3.2
      TaskName: ShortRestingState
    
    rs00:
        id: rs
        task: rest00

the resulting files look like: bids/sub-001/func/sub-001_task-rest00_bold.nii.gz, but no corresponding json descriptors like bids/sub-001/func/sub-001_task-rest00_bold.json are created. (I assume for other mri_ext they might be created during the conversion?).

Additionally, if not given explicitly in the meta-data, I would suggest automatically extracting the RepetitionTime from the header, i.e. via nibabel:
TR = nib.load(nifti_file).get_header().get_zooms()[-1]
and also derive the TaskName from the task attribute, as both seems to be bids requirements.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant