Describe the bug
When using the nibabel2bids plugin to convert NIfTI datasets:
- Diffusion sidecar files (.bval, .bvec) are copied into the BIDS output directory but are not renamed to match the BIDS filename of the corresponding DWI file.
- JSON sidecars are not consistently generated for non-BOLD modalities (e.g. DWI, T1w), even when metadata should be present.
This leads to non-BIDS-compliant outputs.
No explicit error is raised in the logs, but the resulting dataset structure is incorrect.
To reproduce
Steps to reproduce the behavior:
- Take a raw nifti dataset, i.e. https://fcon_1000.projects.nitrc.org/indi/CoRR/html/ipcas_1.html
- Run bidsmapper and bidscoiner using the nibabel2bids plugin
- inspect the output directory: bids/sub-XXXX/ses-1/dwi/
- Observe:
- .bval / .bvec are present but not renamed
- .json may be missing for DWI or other modalities
Expected behavior
The output should be fully BIDS-compliant:
sub-XXXX_ses-1_acq-XXX_dwi.nii.gz
sub-XXXX_ses-1_acq-XXX_dwi.bval
sub-XXXX_ses-1_acq-XXX_dwi.bvec
sub-XXXX_ses-1_acq-XXX_dwi.json
Similarly, other modalities (e.g. T1w) should always include a .json sidecar.
Software version
- BIDS-version: 1.10.0
- BIDScoin-version: 4.6.2
- OS: Linux (Ubuntu 24.04)
Additional context
The same dataset processed with ezBIDS produces fully BIDS-compliant outputs:
- correctly renamed .bval / .bvec
- proper .json sidecars for all modalities
This suggests the issue is specific to the nibabel2bids plugin rather than the input dataset.
Describe the bug
When using the nibabel2bids plugin to convert NIfTI datasets:
This leads to non-BIDS-compliant outputs.
No explicit error is raised in the logs, but the resulting dataset structure is incorrect.
To reproduce
Steps to reproduce the behavior:
Expected behavior
The output should be fully BIDS-compliant:
sub-XXXX_ses-1_acq-XXX_dwi.nii.gz
sub-XXXX_ses-1_acq-XXX_dwi.bval
sub-XXXX_ses-1_acq-XXX_dwi.bvec
sub-XXXX_ses-1_acq-XXX_dwi.json
Similarly, other modalities (e.g. T1w) should always include a .json sidecar.
Software version
Additional context
The same dataset processed with ezBIDS produces fully BIDS-compliant outputs:
This suggests the issue is specific to the nibabel2bids plugin rather than the input dataset.