A quick one-liner tool to extract site metadata from a BIDS dataset. The resulting output can be directly used for a publication, or a website for example.
Warning
We suppose that each patient from the same site (and same modality, task) will have the same parameters.
A BIDS compatible f-mri data directory.
The sites parameters matrix as a csv table in the reStructured Text format.
For example for f-MRI:
Site | Field Strength (T) | Voxel size (mm3) | Matrix size | Flip Angle | TE (s) | TR (s) | Volumes | Scan slices order | Scan time (min) |
---|---|---|---|---|---|---|---|---|---|
THE_OTTAWA_HOSPITAL_CIVIC | 3 | 3.5 | 64x64 | 70 | 0.03 | 2.11 | 250 | sequential decreasing | 8.79 |
bids_scan.py --data /ccna
You can append path(s) to ignore with the --ignore
parameter.
bids_scan.py --data /ccna --ignore /ccna/phenotype --ignore /ccna/sub-XXX0000/
Select which modality you are interrested in with --modality
.
bids_scan.py --data /ccna --ignore /ccna/phenotype --modality func
- pybids 0.12.3
- nibabel 3.2.1
pybids is the python wrapper aroung the bids dataset. nibabel get the imaging parameters (number of volumes, resolution, slice order method and scan time) directly from the NIfTI file if not correctly gathered.