bids-standard / bids-specification

Brain Imaging Data Structure (BIDS) Specification
https://bids-specification.readthedocs.io/
Creative Commons Attribution 4.0 International
267 stars 154 forks source link

Enable NonlinearGradientCorrection to take values "2D" and "3D" #1160

Open effigies opened 1 year ago

effigies commented 1 year ago

Siemens reports nonlinear gradient correction with DIS2D, DIS3D, and ND (via the syngo MR E11E conformance statement:

  • Inline-processing
    • [...]
    • ND - Not Distortion Corrected
    • DIS2D - Distortion Correction 2D
    • DIS3D - Distortion Correction 3D

BIDS has a simple boolean option:

Key name Requirement Level Data type Description
NonlinearGradientCorrection RECOMMENDED, but REQUIRED if PET data are present boolean Boolean stating if the image saved has been corrected for gradient nonlinearities by the scanner sequence. Must be one of: "true", "false".

For backwards compatibility, I would suggest that we map:

DICOM BIDS
ND false
DIS2D "2D"
DIS3D "3D"

I propose keeping false instead of adding a new string like "None", so that using bool(meta["NonlinearGradientCorrection"]) will continue to work as expected. true needs to remain valid for backwards compatibility, but tools will be unable to identify it as either 2D or 3D.

Any objections in principle? If not I can propose an update to the schema that will permit any of these values.

via https://github.com/rordenlab/dcm2niix/issues/597#issuecomment-1193381970

CPernet commented 1 year ago

I don't think this is needed or even recommended because 2D or 3D is what we know Siemens encodes, but we do not know other manufacturers - also other algorithms are possible. The way we trach this so far is in the name with '_rec-xxxx' for instance '_rec-normdist2Dcorr'.

Also, in the name with '_rec-normdistcorr' when in a derivative folder with in the json we add "wasGeneratedBy": "gradient_nonlin_unwarp" (the code we use to compute our own version)