diff --git a/.github/workflows/schemacode_ci.yml b/.github/workflows/schemacode_ci.yml index 46c437826c..db6e77700a 100644 --- a/.github/workflows/schemacode_ci.yml +++ b/.github/workflows/schemacode_ci.yml @@ -33,7 +33,7 @@ jobs: - name: "Install build dependencies" run: pip install --upgrade build twine - name: "Install test dependencies on tag" - run: pip install --upgrade tools/schemacode[tests] + run: pip install --upgrade tools/schemacode[all] if: ${{ startsWith(github.ref, 'refs/tags/schema-') }} - name: "Build archive on tag" run: pytest tools/schemacode/bidsschematools -k make_archive diff --git a/src/appendices/qmri.md b/src/appendices/qmri.md index d0991be72e..d5367cfcdd 100644 --- a/src/appendices/qmri.md +++ b/src/appendices/qmri.md @@ -133,10 +133,13 @@ A guide for using macros can be found at Please visit the [file collections appendix](./file-collections.md#magnetic-resonance-imaging) to see the list of currently supported qMRI applications. -### Quantitative maps are derivatives +### Outputs are quantitative maps -Regardless of how they are obtained (pre- or post-generated), qMRI maps are stored in the `derivatives` directory. -For example a `T1map` can be generated from an `MP2RAGE` file collection using either options. +qMRI maps are stored differently depending on the process that generated them. +Pre-generated qMRI maps MAY be stored as part of a raw BIDS dataset, +whereas they MUST be stored in a derivative BIDS dataset if they were post-generated. + +See the example below of a `T1map` generated from an `MP2RAGE` file collection using either option. If the map is post-generated: @@ -151,15 +154,25 @@ A guide for using macros can be found at "qMRI-software-name": { "sub-01": { "anat": { - "sub-01_T1map.nii.gz": "", + "sub-01_T1map.nii.gz": " # --> T1 map in a derivative dataset", "sub-01_T1map.json": "", - "sub-01_UNIT1.nii.gz": "", + "sub-01_UNIT1.nii.gz": " # --> UNI T1 in a derivative dataset", "sub-01_UNIT1.json": "", - }, }, }, }, }, + "sub-01": { + "anat": { + "sub-01_inv-1_part-mag_MP2RAGE.nii.gz":"", + "sub-01_inv-1_part-phase_MP2RAGE.nii.gz":"", + "sub-01_inv-1_MP2RAGE.json":"", + "sub-01_inv-2_part-mag_MP2RAGE.nii.gz":"", + "sub-01_inv-2_part-phase_MP2RAGE.nii.gz":"", + "sub-01_inv-2_MP2RAGE.json":"", + }, + }, + }, } ) }} @@ -172,25 +185,30 @@ A guide for using macros can be found at {{ MACROS___make_filetree_example( { "ds-example": { - "derivatives": { - "Siemens": { - "sub-01": { - "anat": { - "sub-01_T1map.nii.gz": "", - "sub-01_T1map.json": "", - "sub-01_UNIT1.nii.gz": "", - "sub-01_UNIT1.json": "", - }, - }, - }, + "sub-01": { + "anat": { + "sub-01_inv-1_part-mag_MP2RAGE.nii.gz":"", + "sub-01_inv-1_part-phase_MP2RAGE.nii.gz":"", + "sub-01_inv-1_MP2RAGE.json":"", + "sub-01_inv-2_part-mag_MP2RAGE.nii.gz":"", + "sub-01_inv-2_part-phase_MP2RAGE.nii.gz":"", + "sub-01_inv-2_MP2RAGE.json":"", + "sub-01_T1map.nii.gz": " # --> T1 map in a raw dataset", + "sub-01_T1map.json": "", + "sub-01_UNIT1.nii.gz": " # --> UNI T1 in a raw dataset", + "sub-01_UNIT1.json": "", }, }, + } } ) }} -Note: Even though the process from which pre-generated qMRI maps are obtained (vendor pipelines) is not known, -vendors generally allow exporting of the corresponding input data. -It is RECOMMENDED to share them along with the vendor outputs, whenever possible for a qMRI method supported by BIDS. +!!! note "Sharing of vendor outputs" + + Even though the process from which pre-generated qMRI maps are obtained (vendor pipelines) is not known, + vendors generally allow exporting of the corresponding input data. + It is RECOMMENDED to share them along with the vendor outputs, + whenever possible for a qMRI method supported by BIDS. ### Example datasets @@ -326,7 +344,7 @@ A guide for using macros can be found at `dataset_description.json`: -```text +```json { "Name": "qMRLab Outputs", "BIDSVersion": "1.5.0", @@ -526,12 +544,13 @@ as an input to offline calculation of a `T1map` using a dictionary lookup approa provided by the stock sequence. Instead, the `magnitude` and `phase` images are exported. Please see the relevant discussion at [qMRLab issue #255](https://github.com/qMRLab/qMRLab/issues/255). -Therefore, the `UNIT1` image provided by the scanner is RECOMMENDED to be stored under the `anat` -raw dataset directory along with the `MP2RAGE` file collection and to be used as the primary input -for quantifying a `T1map`. +Therefore, the `UNIT1` image provided by the scanner +SHOULD be stored under the `anat` in a raw BIDS dataset +along with the `MP2RAGE` file collection +and to be used as the primary input for quantifying a `T1map`. -If an additional `UNIT1` image is calculated offline, then the output is to be stored in the -`derivatives` directory with necessary provenance information. +If an additional `UNIT1` image is calculated offline, +then the output MUST be stored in a derivative BIDS dataset with necessary provenance information. ##### `NumberShots` metadata field diff --git a/src/modality-specific-files/magnetic-resonance-imaging-data.md b/src/modality-specific-files/magnetic-resonance-imaging-data.md index fc1424d102..9a6fd23927 100644 --- a/src/modality-specific-files/magnetic-resonance-imaging-data.md +++ b/src/modality-specific-files/magnetic-resonance-imaging-data.md @@ -166,7 +166,7 @@ A guide for using macros can be found at ]) }} -#### Tissue description +### Tissue description {{ MACROS___make_sidecar_table("mri.MRISample") }} +### Deidentification information + +Describes the mechanism or method used to modify or remove metadata +and/or pixel data to protect the patient or participant's identity. + + +{{ MACROS___make_sidecar_table("mri.DeidentificationMethod") }} + +Each object in the `DeidentificationMethodCodeSequence` array includes the following RECOMMENDED keys: + + +{{ MACROS___make_subobject_table("metadata.DeidentificationMethodCodeSequence.items") }} + ## Anatomy imaging data Anatomy MRI sequences measure static, structural features of the brain. diff --git a/src/modality-specific-files/magnetic-resonance-spectroscopy.md b/src/modality-specific-files/magnetic-resonance-spectroscopy.md index 22ec6540e0..1b9b26b22b 100644 --- a/src/modality-specific-files/magnetic-resonance-spectroscopy.md +++ b/src/modality-specific-files/magnetic-resonance-spectroscopy.md @@ -8,9 +8,8 @@ context of the academic literature. !!! example "Example datasets" - Several [example MRS datasets](https://github.com/bids-standard/bids-examples/pull/425) have - been formatted using this specification and can be used for practical guidance when curating a new - dataset. + Several [example MRS datasets](https://github.com/bids-standard/bids-examples?tab=readme-ov-file#mrs) have + been formatted using this specification and can be used for practical guidance when curating a new dataset. ## MRS data @@ -50,11 +49,13 @@ The `*.sdat` file contains either each coil-combined transient stored separately or all transients summed into a signal average. The `*.spar` file is a plaintext file describing acquisition parameters. It is also possible to export raw data as `*.data`/`*.list` or DICOM files. -Siemens scanners allow data export in four formats: i) a proprietary DICOM-structured file known as IMA (`*.ima`); -ii) a conventional DICOM MR Spectroscopy Storage format (`*.dcm`); iii) RDA (`*.rda`), -a proprietary file format with a text-formatted header followed by the binary data points; -and iv) TWIX (`*.dat`), a proprietary file format designed for storing unreconstructed, unprocessed MRS data -from each individual coil element. +Siemens scanners allow data export in four formats: + +1. a proprietary DICOM-structured file known as IMA (`*.ima`); +1. a conventional DICOM MR Spectroscopy Storage format (`*.dcm`); +1. RDA (`*.rda`), a proprietary file format with a text-formatted header followed by the binary data points; +1. TWIX (`*.dat`), a proprietary file format designed for storing unreconstructed, unprocessed MRS data from each individual coil element. + The IMA, DICOM MRS, and RDA formats are typically used to export reconstructed and processed data; however, the sequence designer may choose to also allow the export of un-averaged transients or data from individual coil elements. @@ -153,6 +154,18 @@ A guide for using macros can be found at --> {{ MACROS___make_sidecar_table("mrs.MRSScannerHardware") }} +#### Institution information + + +{{ MACROS___make_sidecar_table("mrs.MRSInstitutionInformation") }} + #### Sequence specifics {{ MACROS___make_sidecar_table("pet.PETSample") }} +#### Deidentification information + +Describes the mechanism or method used to modify or remove metadata +and/or pixel data to protect the patient or participant's identity. + + +{{ MACROS___make_sidecar_table("mri.DeidentificationMethod") }} + +Each object in the `DeidentificationMethodCodeSequence` array includes the following RECOMMENDED keys: + + +{{ MACROS___make_subobject_table("metadata.DeidentificationMethodCodeSequence.items") }} + #### Task If the OPTIONAL [`task-