diff --git a/.gitignore b/.gitignore index 3fd3490188..f060d46efe 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,7 @@ dmypy.json cython_debug/ .*.swp + + +# BEP ignores +bep-23_schema.json diff --git a/.remarkrc b/.remarkrc index 5f10c62bdf..8d6c26487a 100644 --- a/.remarkrc +++ b/.remarkrc @@ -4,7 +4,7 @@ "preset-lint-recommended", "remark-gfm", ["lint-no-duplicate-headings", false], - ["lint-list-item-indent", "tab"], + ["lint-list-item-indent", "tab-size"], ["lint-emphasis-marker", "consistent"], ["lint-maximum-line-length", false], ["lint-maximum-heading-length", false], diff --git a/Makefile b/Makefile index 45c32e1f0a..0301155a79 100644 --- a/Makefile +++ b/Makefile @@ -52,3 +52,12 @@ schemacodedocs_build: schemacodedocs_clean schemacodedocs_serve: schemacodedocs_build uv run python -m http.server -d tools/schemacode/docs/_build + +validateschema: +<<<<<<< HEAD + uv run bst export > bep-23_schema.json + ../bep023/bids-validator/local-run --schema file://${PWD}/bep-23_schema.json ../bep023/bids-examples/petprep/ --config ${PWD}/bep023ValidatorConfig.json --ignoreWarnings --verbose --ignoreNiftiHeaders -r +======= + uv run bst export > local_schema.json + ../bids-validator/local-run ../bids-examples/petprep/ --ignoreWarnings --verbose --ignoreNiftiHeaders -r --schema file://${PWD}/local_schema.json --config bep023ValidatorConfig.json +>>>>>>> 363a844151710b0e2a5b2d7b6dcb9e24700698f6 diff --git a/bep023ValidatorConfig.json b/bep023ValidatorConfig.json new file mode 100644 index 0000000000..cb846755b9 --- /dev/null +++ b/bep023ValidatorConfig.json @@ -0,0 +1,8 @@ +{ + "ignore": [ + { "code": "EMPTY_FILE" }, + { "code": "HED_ERROR"}, + { "code": "SIDECAR_KEY_REQUIRED"}, + { "code": "ALL_FILENAME_RULES_HAVE_ISSUES"} + ] +} diff --git a/mkdocs.yml b/mkdocs.yml index c81a99bc26..63cd6661fa 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -29,6 +29,7 @@ nav: - BIDS Derivatives: derivatives/introduction.md - Common data types and metadata: derivatives/common-data-types.md - Imaging data types: derivatives/imaging.md + - Positron Emission Tomography: derivatives/positron-emmision-tomography.md - Templates and atlases: derivatives/atlas.md - Longitudinal and multi-site studies: longitudinal-and-multi-site-studies.md - Glossary: glossary.md diff --git a/src/derivatives/imaging.md b/src/derivatives/imaging.md index 2aed096552..926c4c1919 100644 --- a/src/derivatives/imaging.md +++ b/src/derivatives/imaging.md @@ -453,13 +453,19 @@ A guide for using macros can be found at "sub-001": { "anat": { "sub-001_dseg.dlabel.nii": "", - "sub-001_dseg.dlabel.nii": "", + "sub-001_dseg.dlabel.json": "", }, }, } } ) }} +## Spatial transformations + +Spatial transformations between coordinate spaces SHOULD be stored using the pattern `from-_to-_mode-image_xfm.`. The `from` and `to` entities identify the source and target spaces, such as `orig`. Allowed extensions are `.txt` and `.json`. + +For example: `sub-01_ses-01_from-T1w_to-MNI152NLin6Asym_mode-image_xfm.txt` + ### Common image-derived labels BIDS supplies a standard, generic label-index mapping, defined in the table diff --git a/src/derivatives/positron-emmision-tomography.md b/src/derivatives/positron-emmision-tomography.md new file mode 100644 index 0000000000..1b5eb105c5 --- /dev/null +++ b/src/derivatives/positron-emmision-tomography.md @@ -0,0 +1,625 @@ +# Positron Emission Tomography Derivatives + +Support for PET Derivatives was developed as a [BIDS Extension Proposal](../extensions.md#bids-extension-proposals). Please see [Citing BIDS](../introduction.md#citing-bids) on how to +appropriately credit this extension when referring to it in the context of academic literature. + +## Goals and scope of this extension + +PET-BIDS Derivatives is a representation of the outputs of common PET preprocessing pipelines, capturing data and meta-data sufficient for a researcher to understand and (critically) reuse those outputs in subsequent processing. It is motivated by use cases where formalized machine readable access to processed data enables higher level processing. In general, it will still follow the “Guidelines for the content and format of PET brain data in publications and archives: A consensus paper”. + +## The PET-BIDS Derivatives specification + +We can distinguish two broad categories of derivatives, in case 1, the different preprocessing +steps are saved and documented, in case 2, only a few final outputs are saved and all steps are +documented in the corresponding json sidecar file. In both cases, changes are documented both +in the filename and the json file to indicate the chain of events. For example, motion corrected +PET data should have the filename `sub-XX_desc-mc_pet.nii.gz`, and then if partial volume +correction using Muller-Gartner (mg) is subsequently applied, the filename should be +`sub-XX-desc-mc_pvc-mg_pet.nii.gz`. For case 2, description values and the chain of events +can be documented using a descriptions.json file, as specified here. Below, we outline the +set of preprocessing steps often carried out in PET brain imaging +(motion correction, registration etc), and also specify the set of files and naming +conventions adopted in the PET-BIDS derivatives specification. + +![Diagram of PET Preprocessing Steps](../modality-specific-files/images/PET_preprocessing_steps_overview.png) + + + +```Text +/ + sub-