From 519bd7f3172d3d112e075bfbbdd857815906a2ae Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Mon, 29 Jan 2024 16:22:28 -0500 Subject: [PATCH 01/14] Add TablePosition tag to the MRI Hardware section and to the glossary --- src/schema/objects/metadata.yaml | 14 ++++++++++++++ src/schema/rules/sidecars/mri.yaml | 1 + 2 files changed, 15 insertions(+) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 7e85b4ac75..17952dad3d 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3366,6 +3366,20 @@ SubjectArtefactDescription: If this field is set to `"n/a"`, it will be interpreted as absence of major source of artifacts except cardiac and blinks. type: string +TablePosition: + name: TablePosition + display_name: Table Position + description: | + The x, y and z coordinates of the table relative to an implementation + specific reference point. The array MUST contain three numeric values + corresponding to x, y, and z axis of the coordinate system in that exact + order. + type: array + minItems: 3 + maxItems: 3 + items: + type: number + unit: mm TaskDescription: name: TaskDescription display_name: Task Description diff --git a/src/schema/rules/sidecars/mri.yaml b/src/schema/rules/sidecars/mri.yaml index 521a70c701..dea556c52d 100644 --- a/src/schema/rules/sidecars/mri.yaml +++ b/src/schema/rules/sidecars/mri.yaml @@ -34,6 +34,7 @@ MRIHardware: MRTransmitCoilSequence: recommended MatrixCoilMode: recommended CoilCombinationMethod: recommended + TablePosition: recommended MRIScannerHardwareASL: selectors: From 0f3d4bce846bcd92cf261a70fe75d87692091d31 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Mon, 29 Jan 2024 16:34:50 -0500 Subject: [PATCH 02/14] Added Alexandre D'Astous to the list of contributors --- src/appendices/contributors.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/appendices/contributors.md b/src/appendices/contributors.md index 2ffab4740f..80adbfcc49 100644 --- a/src/appendices/contributors.md +++ b/src/appendices/contributors.md @@ -54,6 +54,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add | Alexander Jones | 💻🐛 | | Alexander L. Cohen | 🐛💻📖💬 | | Alexander von Lautz | 📖 | +| Alexandre D'Astous | 📖 | | Alexandre Gramfort | 📖💡 | | Alexandre Hutton | 📖 | | Alexandre Routier | 📖 | From 3d71f5985f1a4b85d73638052b1d10265fb2f996 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Mon, 29 Jan 2024 16:22:28 -0500 Subject: [PATCH 03/14] Add TablePosition tag to the MRI Hardware section and to the glossary --- src/schema/objects/metadata.yaml | 14 ++++++++++++++ src/schema/rules/sidecars/mri.yaml | 1 + 2 files changed, 15 insertions(+) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 7e85b4ac75..17952dad3d 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3366,6 +3366,20 @@ SubjectArtefactDescription: If this field is set to `"n/a"`, it will be interpreted as absence of major source of artifacts except cardiac and blinks. type: string +TablePosition: + name: TablePosition + display_name: Table Position + description: | + The x, y and z coordinates of the table relative to an implementation + specific reference point. The array MUST contain three numeric values + corresponding to x, y, and z axis of the coordinate system in that exact + order. + type: array + minItems: 3 + maxItems: 3 + items: + type: number + unit: mm TaskDescription: name: TaskDescription display_name: Task Description diff --git a/src/schema/rules/sidecars/mri.yaml b/src/schema/rules/sidecars/mri.yaml index 521a70c701..dea556c52d 100644 --- a/src/schema/rules/sidecars/mri.yaml +++ b/src/schema/rules/sidecars/mri.yaml @@ -34,6 +34,7 @@ MRIHardware: MRTransmitCoilSequence: recommended MatrixCoilMode: recommended CoilCombinationMethod: recommended + TablePosition: recommended MRIScannerHardwareASL: selectors: From ef8a798a6a01acdded6fccf97740aee48b016456 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Mon, 29 Jan 2024 16:34:50 -0500 Subject: [PATCH 04/14] Added Alexandre D'Astous to the list of contributors --- src/appendices/contributors.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/appendices/contributors.md b/src/appendices/contributors.md index 2ffab4740f..80adbfcc49 100644 --- a/src/appendices/contributors.md +++ b/src/appendices/contributors.md @@ -54,6 +54,7 @@ If you contributed to the BIDS ecosystem and your name is not listed, please add | Alexander Jones | 💻🐛 | | Alexander L. Cohen | 🐛💻📖💬 | | Alexander von Lautz | 📖 | +| Alexandre D'Astous | 📖 | | Alexandre Gramfort | 📖💡 | | Alexandre Hutton | 📖 | | Alexandre Routier | 📖 | From 3bb11d17f03015161180a5023cd76f245d4ff014 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Thu, 14 Mar 2024 13:51:25 -0400 Subject: [PATCH 05/14] Update TablePosition metadata according to code review. --- src/schema/objects/metadata.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index c17046155a..763861512f 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3370,10 +3370,10 @@ TablePosition: name: TablePosition display_name: Table Position description: | - The x, y and z coordinates of the table relative to an implementation - specific reference point. The array MUST contain three numeric values - corresponding to x, y, and z axis of the coordinate system in that exact - order. + The table position, relative to an implementation-specific reference point, + often the isocenter. Values must be an array of three distances in + millimeters, respectively right, anterior and superior (RAS+) of the image + affine. type: array minItems: 3 maxItems: 3 From bb55a38a9ade465c90d5bcd60e23c9c7f2321b0f Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Fri, 22 Mar 2024 17:42:44 -0400 Subject: [PATCH 06/14] Minor rewording of the origin of the table position --- src/schema/objects/metadata.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 763861512f..e11f6ccc73 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3372,8 +3372,8 @@ TablePosition: description: | The table position, relative to an implementation-specific reference point, often the isocenter. Values must be an array of three distances in - millimeters, respectively right, anterior and superior (RAS+) of the image - affine. + millimeters, respectively right, anterior and superior (RAS+) where the + origin is defined by the image affine. type: array minItems: 3 maxItems: 3 From 4a171a07cc862cc684974826cbe952517106e808 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Tue, 16 Apr 2024 11:09:28 -0400 Subject: [PATCH 07/14] Change from patient coordinate system to device --- src/schema/objects/metadata.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index e11f6ccc73..449e79c33c 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3372,8 +3372,11 @@ TablePosition: description: | The table position, relative to an implementation-specific reference point, often the isocenter. Values must be an array of three distances in - millimeters, respectively right, anterior and superior (RAS+) where the - origin is defined by the image affine. + millimeters. The coordinates are respectively right, anterior and superior + (RAS+) as if it were acquired in head first supine (HFS) orientation. In + other words, moving the table into the scanner will increase the 3rd value + in the array (even in the feet first orientation). The origin is defined by + the image affine. type: array minItems: 3 maxItems: 3 From 054d8778da564f6790a47f5d31f265f343b2495f Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Tue, 16 Apr 2024 12:43:41 -0400 Subject: [PATCH 08/14] Apply suggestions from code review --- src/schema/objects/metadata.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 4fa3f93d44..39e9a6bf3a 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3397,12 +3397,13 @@ TablePosition: display_name: Table Position description: | The table position, relative to an implementation-specific reference point, - often the isocenter. Values must be an array of three distances in - millimeters. The coordinates are respectively right, anterior and superior - (RAS+) as if it were acquired in head first supine (HFS) orientation. In - other words, moving the table into the scanner will increase the 3rd value - in the array (even in the feet first orientation). The origin is defined by - the image affine. + often the isocenter. Values must be an array (1x3) of three distances in + millimeters in absolute coordinates (i.e.: world coordinates). The + absolute coordinates are respectively right, anterior and superior (RAS+) + as if it was acquired in head first supine (HFS) orientation. In + other words, moving the table into the scanner will always increase the 3rd + value in the array regardless of the patient positioning (e.g.: feet + first). The origin is defined by the image affine. type: array minItems: 3 maxItems: 3 From 2142da34091dbe4e7f44e14c2f07c1eedd64c7b4 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Tue, 16 Apr 2024 12:44:24 -0400 Subject: [PATCH 09/14] Apply suggestions from code review --- src/schema/objects/metadata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 39e9a6bf3a..5ace53c837 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3402,7 +3402,7 @@ TablePosition: absolute coordinates are respectively right, anterior and superior (RAS+) as if it was acquired in head first supine (HFS) orientation. In other words, moving the table into the scanner will always increase the 3rd - value in the array regardless of the patient positioning (e.g.: feet + value in the array regardless of the patient positioning (e.g.: feet first). The origin is defined by the image affine. type: array minItems: 3 From bc70fc15785d0ebd5e43cd0bf2da2c557168de88 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Tue, 16 Apr 2024 13:08:15 -0400 Subject: [PATCH 10/14] Remove regardless --- src/schema/objects/metadata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 5ace53c837..9cafcedfa3 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3402,7 +3402,7 @@ TablePosition: absolute coordinates are respectively right, anterior and superior (RAS+) as if it was acquired in head first supine (HFS) orientation. In other words, moving the table into the scanner will always increase the 3rd - value in the array regardless of the patient positioning (e.g.: feet + value in the array, even for other patient positions (e.g.: feet first). The origin is defined by the image affine. type: array minItems: 3 From b2529a068c6371cdf7552fccba4d33736da85b00 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Tue, 16 Apr 2024 13:11:28 -0400 Subject: [PATCH 11/14] Change e.g. --- src/schema/objects/metadata.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 9cafcedfa3..b949d5b68c 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3402,7 +3402,7 @@ TablePosition: absolute coordinates are respectively right, anterior and superior (RAS+) as if it was acquired in head first supine (HFS) orientation. In other words, moving the table into the scanner will always increase the 3rd - value in the array, even for other patient positions (e.g.: feet + value in the array, regardless of the patient positioning (i.e.: feet first). The origin is defined by the image affine. type: array minItems: 3 From 383fbe6f409af557e18ad76043db4c77ba682ed3 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Tue, 16 Apr 2024 13:19:56 -0400 Subject: [PATCH 12/14] Remove latin abbreviations --- src/schema/objects/metadata.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index b949d5b68c..34bd71a367 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3398,12 +3398,12 @@ TablePosition: description: | The table position, relative to an implementation-specific reference point, often the isocenter. Values must be an array (1x3) of three distances in - millimeters in absolute coordinates (i.e.: world coordinates). The + millimeters in absolute coordinates (world coordinates). The absolute coordinates are respectively right, anterior and superior (RAS+) as if it was acquired in head first supine (HFS) orientation. In other words, moving the table into the scanner will always increase the 3rd - value in the array, regardless of the patient positioning (i.e.: feet - first). The origin is defined by the image affine. + value in the array, regardless of the patient positioning (feet + first for example). The origin is defined by the image affine. type: array minItems: 3 maxItems: 3 From 1d4ffe04d7b9a93c2b518322dcfca6db6cd84ec1 Mon Sep 17 00:00:00 2001 From: Alexandre D'Astous Date: Wed, 5 Jun 2024 15:25:37 -0400 Subject: [PATCH 13/14] Update the definition --- src/schema/objects/metadata.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml index 34bd71a367..5436c2d7a4 100644 --- a/src/schema/objects/metadata.yaml +++ b/src/schema/objects/metadata.yaml @@ -3398,12 +3398,11 @@ TablePosition: description: | The table position, relative to an implementation-specific reference point, often the isocenter. Values must be an array (1x3) of three distances in - millimeters in absolute coordinates (world coordinates). The - absolute coordinates are respectively right, anterior and superior (RAS+) - as if it was acquired in head first supine (HFS) orientation. In - other words, moving the table into the scanner will always increase the 3rd - value in the array, regardless of the patient positioning (feet - first for example). The origin is defined by the image affine. + millimeters in absolute coordinates (world coordinates). If an observer + stands in front of the scanner looking at it, a table moving to the left, + up or into the scanner (from the observer's point of view) will increase + the 1st, 2nd and 3rd value in the array respectively. The origin is defined + by the image affine. type: array minItems: 3 maxItems: 3 From 0f4a010a76ddb3221f869fb4accfaa6ffd0b4bcc Mon Sep 17 00:00:00 2001 From: Alex Dastous <47249340+po09i@users.noreply.github.com> Date: Tue, 13 Aug 2024 17:06:22 -0400 Subject: [PATCH 14/14] Update src/schema/rules/sidecars/mri.yaml Co-authored-by: Chris Markiewicz --- src/schema/rules/sidecars/mri.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/schema/rules/sidecars/mri.yaml b/src/schema/rules/sidecars/mri.yaml index c08be9cc55..b4ec44f535 100644 --- a/src/schema/rules/sidecars/mri.yaml +++ b/src/schema/rules/sidecars/mri.yaml @@ -37,7 +37,22 @@ MRIHardware: MatrixCoilMode: recommended CoilCombinationMethod: recommended NumberTransmitCoilActiveElements: optional - TablePosition: recommended + TablePosition: + level: optional + level_addendum: recommended if `chunk` entity is present + +MRIChunkPosition: + selectors: + - modality == "mri" + - entities.chunk + - match(extension, '\.nii(\.gz)?$') + fields: + TablePosition: + level: recommended + issue: + code: TABLE_POSITION_RECOMMENDED + message: | + TablePosition is RECOMMENDED if the chunk entity is present. MRISample: selectors: