NILAB-UvA / bidsify

Tool to convert raw MRI datasets to BIDS-compatible datasets
Other
32 stars 6 forks source link

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

Open rscgh opened 3 years ago

rscgh commented 3 years ago

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.