aces / Loris-MRI

The set of scripts that preprocess and insert MRI data into the database.
10 stars 51 forks source link

tools/minc_to_bids_converter.pl #1070

Closed cmadjar closed 4 months ago

cmadjar commented 6 months ago

Test Plan

Bugs previously found

CamilleBeau commented 5 months ago

I am getting this error from running the bids-validator:

(loris-mri-python) lorisadmin@cbeaudoin-test-26:/opt/Loris-MRI/bin/mri$ bids-validator /data/Loris-MRI/data/BIDS_export/BIDS_LORIS25_test/ /usr/lib/node_modules/bids-validator/dist/commonjs/cli.js:127308 var fd = FormData; ^

ReferenceError: FormData is not defined at node_modules/then-request/lib/browser.js (/usr/lib/node_modules/bids-validator/dist/commonjs/cli.js:127308:14) at __require2 (/usr/lib/node_modules/bids-validator/dist/commonjs/cli.js:111080:51) at Object. (/usr/lib/node_modules/bids-validator/dist/commonjs/cli.js:128964:36) at Module._compile (node:internal/modules/cjs/loader:1198:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10) at Module.load (node:internal/modules/cjs/loader:1076:32) at Function.Module._load (node:internal/modules/cjs/loader:911:12) at Module.require (node:internal/modules/cjs/loader:1100:19) at require (node:internal/modules/cjs/helpers:119:18) at Object. (/usr/lib/node_modules/bids-validator/bin/bids-validator:18:30)

CamilleBeau commented 5 months ago

Other than that, I got these warnings in the converter script, but everything else ran fine. Not sure all of these are expected or bugs:

WARNING: Cannot compute EffectiveEchoSpacing & TotalReadoutTime for demo_947103_V6_fMRI_001.mnc 'dicom_0x0019:el_0x1028' should be a number. Its value is 26.483 'dicom_0x0051:el_0x100b' should be a number. Its value is 64

WARNING: skipping demo_947103_V6_fieldmapDWI_002.mnc since fieldmapDWI is not listed in bids_mri_scan_type_rel. (also a few more like this) WARNING: skipping demo_300125_V1_fieldmapBOLD_003.mnc since fieldmapBOLD is not listed in bids_mri_scan_type_rel. WARNING: skipping demo_300125_V1_dwi25_001.mnc since dwi25 is not listed in bids_mri_scan_type_rel. WARNING: skipping demo_300170_V1_dwi65_001.mnc since dwi65 is not listed in bids_mri_scan_type_rel.

WARNING: SliceTiming is not supplied as the values read from the MINC header seem erroneous. This is most likely due to a dcm2mnc conversion problem

WARNING: Cannot compute EffectiveEchoSpacing & TotalReadoutTime for demo_300192_V1_fMRI_002.mnc 'dicom_0x0019:el_0x1028' should be a number. Its value is -49b, -9b, 83b, -29b, -91b, 123b, 58b, 64b 'dicom_0x0051:el_0x100b' should be a number. Its value is => This is unfortunately the result of a bad dcm2mnc conversion...

CamilleBeau commented 5 months ago

Note: Node.js >= 18 required for bids-validator to work

CamilleBeau commented 4 months ago

After #1127, the output from bids-validator looks like this:

Screen Shot 2024-05-28 at 12 53 14 PM Screen Shot 2024-05-28 at 12 53 24 PM

Is this normal output or does it indicate an issue with the minc_to_bids_converter.pl?

CamilleBeau commented 4 months ago

Following discussion with Cecile, this script is passing tests with https://github.com/aces/Loris-MRI/pull/1127