Skip to content

Commit d4057ab

Browse files
committed
Move desc entity to end and clean up formatting.
Also add model and parameter entities to schema.
1 parent 177824a commit d4057ab

File tree

3 files changed

+80
-62
lines changed

3 files changed

+80
-62
lines changed

src/derivatives/diffusion-derivatives.md

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919

2020
```Text
2121
<pipeline_name>/
22-
sub-<participant_label>/
23-
dwi/
24-
<source_keywords>[_space-<space>]_desc-preproc_dwi.nii[.gz]
25-
<source_keywords>[_space-<space>]_desc-preproc_dwi.bval
26-
<source_keywords>[_space-<space>]_desc-preproc_dwi.bvec
27-
<source_keywords>[_space-<space>]_desc-preproc_dwi.json
22+
sub-<label>/
23+
[ses-<label>/]
24+
dwi/
25+
<source-entities>[_space-<space>]_desc-preproc_dwi.nii[.gz]
26+
<source-entities>[_space-<space>]_desc-preproc_dwi.bval
27+
<source-entities>[_space-<space>]_desc-preproc_dwi.bvec
28+
<source-entities>[_space-<space>]_desc-preproc_dwi.json
2829
```
2930

3031
## Diffusion models
@@ -52,17 +53,18 @@ that warrant explicit mention due to their consequence in how they are represent
5253

5354
```Text
5455
<pipeline_name>/
55-
sub-<participant_label>/
56-
dwi/
57-
<source_keywords>[_space-<space>]_model-<label>[_desc-<desc>]_param-<label1>_dwimap.nii[.gz]
58-
<source_keywords>[_space-<space>]_model-<label>[_desc-<desc>]_param-<label1>_dwimap.json
59-
<source_keywords>[_space-<space>]_model-<label>[_desc-<desc>]_param-<label2>_dwimap.nii[.gz]
60-
<source_keywords>[_space-<space>]_model-<label>[_desc-<desc>]_param-<label2>_dwimap.json
61-
<source_keywords>[_space-<space>]_model-<label>[_desc-<desc>]_param-<label3>_dwimap.nii[.gz]
62-
<source_keywords>[_space-<space>]_model-<label>[_desc-<desc>]_param-<label3>_dwimap.json
56+
sub-<label>/
57+
[ses-<label>/]
58+
dwi/
59+
<source-entities>[_space-<space>]_model-<label>_param-<label1>[_desc-<label>]_dwimap.nii[.gz]
60+
<source-entities>[_space-<space>]_model-<label>_param-<label1>[_desc-<label>]_dwimap.json
61+
<source-entities>[_space-<space>]_model-<label>_param-<label2>[_desc-<label>]_dwimap.nii[.gz]
62+
<source-entities>[_space-<space>]_model-<label>_param-<label2>[_desc-<label>]_dwimap.json
63+
<source-entities>[_space-<space>]_model-<label>_param-<label3>[_desc-<label>]_dwimap.nii[.gz]
64+
<source-entities>[_space-<space>]_model-<label>_param-<label3>[_desc-<label>]_dwimap.json
6365
```
6466

65-
- Files "`<source_keywords>_model-<label>_param-<label*>_dwimap.nii[.gz]`"
67+
- Files "`<source-entities>_model-<label>_param-<label*>_dwimap.nii[.gz]`"
6668
provide image data encoding the different parameters that may be estimated by the model.
6769
If the image is a three-dimensional volume,
6870
then in the absence of any metadata indicating to the contrary,
@@ -72,7 +74,7 @@ that warrant explicit mention due to their consequence in how they are represent
7274
indicating how data across dimensions beyond the three spatial dimensions
7375
should be interpreted.
7476

75-
- Files "`<source_keywords>_model-<label>_param-<label*>_dwimap.json`"
77+
- Files "`<source-entities>_model-<label>_param-<label*>_dwimap.json`"
7678
MUST provide information about the model,
7779
and SHOULD provide information about how it was fit to the empirical image data.
7880
In circumstances where the dimensionality of the corresponding NIfTI image is greater than three,
@@ -338,18 +340,18 @@ A guide for using macros can be found at
338340
-->
339341
{{ MACROS___make_filetree_example(
340342
{
341-
"dti_pipeline": {
342-
"sub-01": {
343-
"dwi": {
344-
"sub-01_model-tensor_param-diffusivity_dwimap.nii.gz": "",
345-
"sub-01_model-tensor_param-diffusivity_dwimap.json": "",
346-
"sub-01_model-tensor_param-s0_dwimap.nii.gz": "",
347-
"sub-01_model-tensor_param-s0_dwimap.json": "",
348-
"sub-01_model-tensor_param-fa_dwimap.nii.gz": "",
349-
"sub-01_model-tensor_param-fa_dwimap.json": "",
350-
},
343+
"dti_pipeline": {
344+
"sub-01": {
345+
"dwi": {
346+
"sub-01_model-tensor_param-diffusivity_dwimap.nii.gz": "",
347+
"sub-01_model-tensor_param-diffusivity_dwimap.json": "",
348+
"sub-01_model-tensor_param-s0_dwimap.nii.gz": "",
349+
"sub-01_model-tensor_param-s0_dwimap.json": "",
350+
"sub-01_model-tensor_param-fa_dwimap.nii.gz": "",
351+
"sub-01_model-tensor_param-fa_dwimap.json": "",
352+
},
353+
},
351354
},
352-
},
353355
}
354356
) }}
355357

@@ -440,18 +442,18 @@ A guide for using macros can be found at
440442
-->
441443
{{ MACROS___make_filetree_example(
442444
{
443-
"msmtcsd_pipeline": {
444-
"sub-01": {
445-
"dwi": {
446-
"sub-01_model-csd_param-wm_dwimap.nii.gz": "",
447-
"sub-01_model-csd_param-wm_dwimap.json": "",
448-
"sub-01_model-csd_param-gm_dwimap.nii.gz": "",
449-
"sub-01_model-csd_param-gm_dwimap.json": "",
450-
"sub-01_model-csd_param-csf_dwimap.nii.gz": "",
451-
"sub-01_model-csd_param-csf_dwimap.nii.gz": "",
452-
},
445+
"msmtcsd_pipeline": {
446+
"sub-01": {
447+
"dwi": {
448+
"sub-01_model-csd_param-wm_dwimap.nii.gz": "",
449+
"sub-01_model-csd_param-wm_dwimap.json": "",
450+
"sub-01_model-csd_param-gm_dwimap.nii.gz": "",
451+
"sub-01_model-csd_param-gm_dwimap.json": "",
452+
"sub-01_model-csd_param-csf_dwimap.nii.gz": "",
453+
"sub-01_model-csd_param-csf_dwimap.nii.gz": "",
454+
},
455+
},
453456
},
454-
},
455457
}
456458
) }}
457459

@@ -661,30 +663,30 @@ A guide for using macros can be found at
661663
-->
662664
{{ MACROS___make_filetree_example(
663665
{
664-
"bedpostx_pipeline": {
665-
"sub-01": {
666-
"dwi": {
667-
"sub-01_model-bs_desc-mean_param-s0_dwimap.nii.gz": "",
668-
"sub-01_model-bs_desc-mean_param-s0_dwimap.json": "",
669-
"sub-01_model-bs_desc-mean_param-polar_dwimap.nii.gz": "",
670-
"sub-01_model-bs_desc-mean_param-polar_dwimap.json": "",
671-
"sub-01_model-bs_desc-mean_param-vector_dwimap.nii.gz": "",
672-
"sub-01_model-bs_desc-mean_param-vector_dwimap.json": "",
673-
"sub-01_model-bs_desc-mean_param-vf_dwimap.nii.gz": "",
674-
"sub-01_model-bs_desc-mean_param-vf_dwimap.json": "",
675-
"sub-01_model-bs_desc-mean_param-vfsum_dwimap.nii.gz": "",
676-
"sub-01_model-bs_desc-mean_param-vfsum_dwimap.json": "",
677-
"sub-01_model-bs_desc-mean_param-diffusivity_dwimap.nii.gz": "",
678-
"sub-01_model-bs_desc-mean_param-diffusivity_dwimap.json": "",
679-
"sub-01_model-bs_desc-mean_param-dstd_dwimap.nii.gz": "",
680-
"sub-01_model-bs_desc-mean_param-dstd_dwimap.json": "",
681-
"sub-01_model-bs_desc-merged_param-polar_dwimap.nii.gz": "",
682-
"sub-01_model-bs_desc-merged_param-polar_dwimap.json": "",
683-
"sub-01_model-bs_desc-merged_param-vf_dwimap.nii.gz": "",
684-
"sub-01_model-bs_desc-merged_param-vf_dwimap.json": "",
685-
},
666+
"bedpostx_pipeline": {
667+
"sub-01": {
668+
"dwi": {
669+
"sub-01_model-bs_desc-mean_param-s0_dwimap.nii.gz": "",
670+
"sub-01_model-bs_desc-mean_param-s0_dwimap.json": "",
671+
"sub-01_model-bs_desc-mean_param-polar_dwimap.nii.gz": "",
672+
"sub-01_model-bs_desc-mean_param-polar_dwimap.json": "",
673+
"sub-01_model-bs_desc-mean_param-vector_dwimap.nii.gz": "",
674+
"sub-01_model-bs_desc-mean_param-vector_dwimap.json": "",
675+
"sub-01_model-bs_desc-mean_param-vf_dwimap.nii.gz": "",
676+
"sub-01_model-bs_desc-mean_param-vf_dwimap.json": "",
677+
"sub-01_model-bs_desc-mean_param-vfsum_dwimap.nii.gz": "",
678+
"sub-01_model-bs_desc-mean_param-vfsum_dwimap.json": "",
679+
"sub-01_model-bs_desc-mean_param-diffusivity_dwimap.nii.gz": "",
680+
"sub-01_model-bs_desc-mean_param-diffusivity_dwimap.json": "",
681+
"sub-01_model-bs_desc-mean_param-dstd_dwimap.nii.gz": "",
682+
"sub-01_model-bs_desc-mean_param-dstd_dwimap.json": "",
683+
"sub-01_model-bs_desc-merged_param-polar_dwimap.nii.gz": "",
684+
"sub-01_model-bs_desc-merged_param-polar_dwimap.json": "",
685+
"sub-01_model-bs_desc-merged_param-vf_dwimap.nii.gz": "",
686+
"sub-01_model-bs_desc-merged_param-vf_dwimap.json": "",
687+
},
688+
},
686689
},
687-
},
688690
}
689691
) }}
690692

@@ -931,7 +933,7 @@ Notes:
931933
- Care must be taken for images of greater than three dimensions
932934
where additional dimensions do *not* encode anisotropy information:
933935

934-
- In image `"*_desc-mean*_param-vf_*"`,
936+
- In image `"*_param-vf_desc-mean*_*"`,
935937
the fourth image axis encodes scalar information across stick components.
936938
Since this is *not* coefficients in some orientation encoding,
937939
but the image possesses more than three axes,

src/schema/objects/entities.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,13 @@ modality:
177177
For example, `sub-01_mod-T1w_defacemask.nii.gz`.
178178
type: string
179179
format: label
180+
model:
181+
name: model
182+
display_name: Model
183+
description: |
184+
The `model-<label>` entity can be used to distinguish different models.
185+
type: string
186+
format: label
180187
mtransfer:
181188
name: mt
182189
display_name: Magnetization Transfer
@@ -206,6 +213,13 @@ nucleus:
206213
the associated metadata.
207214
type: string
208215
format: label
216+
parameter:
217+
name: param
218+
display_name: Parameter
219+
description: |
220+
The `param-<label>` entity can be used to distinguish different parameters.
221+
type: string
222+
format: label
209223
part:
210224
name: part
211225
display_name: Part

src/schema/rules/entities.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
- processing
2525
- hemisphere
2626
- space
27+
- model
28+
- parameter
2729
- split
2830
- recording
2931
- chunk

0 commit comments

Comments
 (0)