Skip to content

Commit 8e175f4

Browse files
authored
Merge pull request #1567 from mguaypaq/mgp/allow-desc-in-segmentations
[FIX] Re-align the text and the schema for filenames in derivatives
2 parents 089142f + eebdaf6 commit 8e175f4

File tree

3 files changed

+54
-26
lines changed

3 files changed

+54
-26
lines changed

src/derivatives/common-data-types.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ Template:
180180
```Text
181181
<pipeline_name>/
182182
sub-<label>/
183-
<datatype>/
184-
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
183+
[ses-<label>/]
184+
<datatype>/
185+
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
185186
```
186187

187188
Data is considered to be *preprocessed* or *cleaned* if the data type of the input,

src/derivatives/imaging.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ Template:
1010
```Text
1111
<pipeline_name>/
1212
sub-<label>/
13-
<datatype>/
14-
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
13+
[ses-<label>/]
14+
<datatype>/
15+
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
1516
```
1617

1718
Volumetric preprocessing does not modify the number of dimensions, and so
@@ -147,8 +148,10 @@ Template:
147148
```Text
148149
<pipeline_name>/
149150
sub-<label>/
150-
anat|func|dwi/
151-
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_label-<label>][_desc-<label>]_mask.nii.gz
151+
[ses-<label>/]
152+
anat|func|dwi/
153+
<source_entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.json
154+
<source_entities>[_space-<space>][_res-<label>][_label-<label>][_desc-<label>]_mask.nii[.gz]
152155
```
153156

154157
A binary (1 - inside, 0 - outside) mask in the space defined by the [`space` entity](../appendices/entities.md#space).
@@ -264,8 +267,11 @@ Template:
264267
```Text
265268
<pipeline_name>/
266269
sub-<label>/
267-
anat|func|dwi/
268-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_den-<label>]_dseg.nii.gz
270+
[ses-<label>/]
271+
anat|func|dwi/
272+
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.json
273+
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.nii[.gz]
274+
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_desc-<label>]_dseg.tsv
269275
```
270276

271277
Example:
@@ -328,8 +334,10 @@ Template:
328334
```Text
329335
<pipeline_name>/
330336
sub-<label>/
331-
func|anat|dwi/
332-
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_label-<label>]_probseg.nii.gz
337+
[ses-<label>/]
338+
func|anat|dwi/
339+
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.json
340+
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_label-<label>][_desc-<label>]_probseg.nii[.gz]
333341
```
334342

335343
Example:
@@ -402,8 +410,12 @@ Template:
402410
```Text
403411
<pipeline_name>/
404412
sub-<label>/
405-
anat/
406-
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>]_dseg.{label.gii|dlabel.nii}
413+
[ses-<label>/]
414+
anat/
415+
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.json
416+
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_den-<label>][_desc-<label>]_dseg.label.gii
417+
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.dlabel.nii
418+
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_desc-<label>]_dseg.tsv
407419
```
408420

409421
The [`hemi-<label>`](../appendices/entities.md#hemi) entity is REQUIRED for GIFTI files storing information about

src/schema/rules/files/deriv/imaging.yaml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ anat_parametric_mask:
6262
$ref: rules.files.raw.anat.parametric.entities
6363
space: optional
6464
resolution: optional
65-
density: optional
6665
label: optional
6766
description: optional
6867

@@ -76,7 +75,6 @@ anat_nonparametric_mask:
7675
$ref: rules.files.raw.anat.nonparametric.entities
7776
space: optional
7877
resolution: optional
79-
density: optional
8078
label: optional
8179
description: optional
8280

@@ -86,11 +84,14 @@ dwi_mask:
8684
$ref: rules.files.raw.dwi.dwi
8785
suffixes:
8886
- mask
87+
extensions:
88+
- .nii.gz
89+
- .nii
90+
- .json
8991
entities:
9092
$ref: rules.files.raw.dwi.dwi.entities
9193
space: optional
9294
resolution: optional
93-
density: optional
9495
label: optional
9596
description: optional
9697

@@ -104,7 +105,6 @@ func_mask:
104105
$ref: rules.files.raw.func.func.entities
105106
space: optional
106107
resolution: optional
107-
density: optional
108108
label: optional
109109
description: optional
110110

@@ -117,8 +117,8 @@ anat_parametric_discrete_segmentation:
117117
entities:
118118
$ref: rules.files.raw.anat.parametric.entities
119119
space: optional
120+
segmentation: optional
120121
resolution: optional
121-
density: optional
122122
description: optional
123123
extensions:
124124
- .nii.gz
@@ -135,8 +135,8 @@ anat_nonparametric_discrete_segmentation:
135135
entities:
136136
$ref: rules.files.raw.anat.nonparametric.entities
137137
space: optional
138+
segmentation: optional
138139
resolution: optional
139-
density: optional
140140
description: optional
141141
extensions:
142142
- .nii.gz
@@ -153,9 +153,14 @@ func_discrete_segmentation:
153153
entities:
154154
$ref: rules.files.raw.func.func.entities
155155
space: optional
156+
segmentation: optional
156157
resolution: optional
157-
density: optional
158158
description: optional
159+
extensions:
160+
- .nii.gz
161+
- .nii
162+
- .json
163+
- .tsv
159164

160165
dwi_discrete_segmentation:
161166
selectors:
@@ -167,8 +172,12 @@ dwi_discrete_segmentation:
167172
$ref: rules.files.raw.dwi.dwi.entities
168173
space: optional
169174
resolution: optional
170-
density: optional
171175
description: optional
176+
extensions:
177+
- .nii.gz
178+
- .nii
179+
- .json
180+
- .tsv
172181

173182
anat_parametric_probabilistic_segmentation:
174183
selectors:
@@ -179,8 +188,8 @@ anat_parametric_probabilistic_segmentation:
179188
entities:
180189
$ref: rules.files.raw.anat.parametric.entities
181190
space: optional
191+
segmentation: optional
182192
resolution: optional
183-
density: optional
184193
label: optional
185194
description: optional
186195

@@ -193,8 +202,8 @@ anat_nonparametric_probabilistic_segmentation:
193202
entities:
194203
$ref: rules.files.raw.anat.nonparametric.entities
195204
space: optional
205+
segmentation: optional
196206
resolution: optional
197-
density: optional
198207
label: optional
199208
description: optional
200209

@@ -207,8 +216,8 @@ func_probabilistic_segmentation:
207216
entities:
208217
$ref: rules.files.raw.func.func.entities
209218
space: optional
219+
segmentation: optional
210220
resolution: optional
211-
density: optional
212221
label: optional
213222
description: optional
214223

@@ -221,12 +230,16 @@ dwi_probabilistic_segmentation:
221230
entities:
222231
$ref: rules.files.raw.dwi.dwi.entities
223232
space: optional
233+
segmentation: optional
224234
resolution: optional
225-
density: optional
226235
label: optional
227236
description: optional
237+
extensions:
238+
- .nii.gz
239+
- .nii
240+
- .json
228241

229-
anat_parametic_discrete_surface:
242+
anat_parametric_discrete_surface:
230243
selectors:
231244
- dataset.dataset_description.DatasetType == 'derivative'
232245
$ref: rules.files.raw.anat.parametric
@@ -241,11 +254,12 @@ anat_parametic_discrete_surface:
241254
$ref: rules.files.raw.anat.parametric.entities
242255
hemisphere: optional
243256
space: optional
257+
segmentation: optional
244258
resolution: optional
245259
density: optional
246260
description: optional
247261

248-
anat_nonparametic_discrete_surface:
262+
anat_nonparametric_discrete_surface:
249263
selectors:
250264
- dataset.dataset_description.DatasetType == 'derivative'
251265
$ref: rules.files.raw.anat.nonparametric
@@ -260,6 +274,7 @@ anat_nonparametic_discrete_surface:
260274
$ref: rules.files.raw.anat.nonparametric.entities
261275
hemisphere: optional
262276
space: optional
277+
segmentation: optional
263278
resolution: optional
264279
density: optional
265280
description: optional

0 commit comments

Comments
 (0)