Skip to content

Commit

Permalink
Merge pull request #1 from effigies/enh/segmentation
Browse files Browse the repository at this point in the history
ENH: Remove Atlas metadata, update imaging derivatives text around seg-
  • Loading branch information
melanieganz authored Aug 15, 2023
2 parents 5ac3791 + 9c7ca6d commit 83d544e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
25 changes: 12 additions & 13 deletions src/derivatives/imaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ Template:

A binary (1 - inside, 0 - outside) mask in the space defined by the [`space` entity](../appendices/entities.md#space).
If no transformation has taken place, the value of `space` SHOULD be set to `orig`.
If the mask is an ROI mask derived from an atlas, then the [`label` entity](../appendices/entities.md#label)) SHOULD
be used to specify the masked structure
If the mask is an ROI mask derived from an atlas segmentation,
then the [`label` entity](../appendices/entities.md#label)) SHOULD be used to specify the masked structure
(see [Common image-derived labels](#common-image-derived-labels)),
and the `Atlas` metadata SHOULD be defined.

Expand Down Expand Up @@ -229,10 +229,10 @@ structure may be concatenated in a single file.
Segmentations may be defined in a volume (labeled voxels), a surface (labeled
vertices) or a combined volume/surface space.

If the segmentation can be derived from different atlases,
the [`atlas` entity](../appendices/entities.md#atlas) MAY be used to
distinguish the different segmentations.
If so, the `Atlas` metadata SHOULD also be defined.
If the segmentation can be generated in different ways,
for example, following an atlas segmentation,
the [`seg` entity](../appendices/entities.md#atlas) MAY be used to
distinguish the name of the segmentation used.

The following section describes discrete and probabilistic segmentations of
volumes, followed by discrete segmentations of surface/combined spaces.
Expand Down Expand Up @@ -268,7 +268,7 @@ Template:
<pipeline_name>/
sub-<label>/
anat|func|dwi/
<source_entities>[_space-<space>][_atlas-<label>][_res-<label>][_den-<label>]_dseg.nii.gz
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_den-<label>]_dseg.nii.gz
```

Example:
Expand Down Expand Up @@ -296,8 +296,7 @@ In this case, the mask suffix MUST be used,
the [`label` entity](../appendices/entities.md#label)) SHOULD be used
to specify the masked structure
(see [Common image-derived labels](#common-image-derived-labels)),
the [`atlas` entity](../appendices/entities.md#atlas) and the
`Atlas` metadata SHOULD be defined.
and the [`seg` entity](../appendices/entities.md#atlas) SHOULD be defined.

For example:

Expand All @@ -310,8 +309,8 @@ A guide for using macros can be found at
"pipeline": {
"sub-001": {
"anat": {
"sub-001_space-orig_atlas-Desikan_label-GM_mask.nii.gz": "",
"sub-001_space-orig_atlas-Desikan_label-GM_mask.json": "",
"sub-001_space-orig_seg-Desikan_label-GM_mask.nii.gz": "",
"sub-001_space-orig_seg-Desikan_label-GM_mask.json": "",
},
},
}
Expand All @@ -333,7 +332,7 @@ Template:
<pipeline_name>/
sub-<label>/
func|anat|dwi/
<source_entities>[_space-<space>][_atlas-<label>][_res-<label>][_den-<label>][_label-<label>]_probseg.nii.gz
<source_entities>[_space-<space>][_seg-<label>][_res-<label>][_den-<label>][_label-<label>]_probseg.nii.gz
```

Example:
Expand Down Expand Up @@ -407,7 +406,7 @@ Template:
<pipeline_name>/
sub-<label>/
anat/
<source_entities>[_hemi-{L|R}][_space-<space>][_atlas-<label>][_res-<label>][_den-<label>]_dseg.{label.gii|dlabel.nii}
<source_entities>[_hemi-{L|R}][_space-<space>][_seg-<label>][_res-<label>][_den-<label>]_dseg.{label.gii|dlabel.nii}
```

The [`hemi-<label>`](../appendices/entities.md#hemi) entity is REQUIRED for GIFTI files storing information about
Expand Down
6 changes: 0 additions & 6 deletions src/schema/objects/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,6 @@ AssociatedEmptyRoom:
format: dataset_relative
- type: string
format: bids_uri
Atlas:
name: Atlas
display_name: Atlas
description: |
Which atlas (if any) was used to generate the mask.
type: string
AttenuationCorrection:
name: AttenuationCorrection
display_name: Attenuation Correction
Expand Down
10 changes: 0 additions & 10 deletions src/schema/rules/sidecars/derivatives/common_derivatives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ SegmentationCommon:
fields:
Manual: optional

SegmentationCommonAtlas:
selectors:
- dataset.dataset_description.DatasetType == "derivative"
- 'intersects([suffix], ["dseg", "probseg"])'
- '"atlas" in entities'
fields:
Atlas:
level: recommended
level_addendum: if `atlas` is present

# Derivatives -> Imaging data types
ImageDerivatives:
selectors:
Expand Down

0 comments on commit 83d544e

Please sign in to comment.