brainlife / ezbids

A web service for semi-automated conversion of raw imaging data to BIDS
https://brainlife.io/ezbids
MIT License
26 stars 13 forks source link

[BUG] NIfTi's containing spaces? not picked up by ezBIDS #119

Closed bendhouseart closed 7 months ago

bendhouseart commented 8 months ago

Given an input directory like so:

[user@machine sub-02]$ tree -d
.
├── anat
└── ses-baseline
    └── sub-02_ses-baseline_trc-ps13_pet

Where anat contains the following nii file 'AG MRI 02.16.24.nii' ezBIDS does not pick up on that MR image after upload:

Screenshot 2024-02-16 at 1 41 30 PM

ezBIDS version is set to commit d5b2ff2831205b86cf85afd0994632950be2c77b

bendhouseart commented 8 months ago

Hmm might not be the spaces, renamed the file in question to AG_MRI_02.16.24.nii and same issue.

dlevitas commented 7 months ago

This appears to be an issue with how NIH anatomical data collected with PET acquisitions are transformed to NIfTI format outside of ezBIDS. The [unintended] result of this process is that the NIfTI files are now 4D with a singelton 4th dimension (see here for related discussion).

Can probably just add a try except block, but need to get a better sense of how to detect when improperly added 4th dimension exists for otherwise 3D anatomical data.

dlevitas commented 7 months ago

Fixed in commit 153b7e0