Skip to content

Commit

Permalink
enh: generalization of atlas metadata cc/ @jdkent
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Jun 17, 2024
1 parent bba4159 commit f159e61
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions src/derivatives/atlas.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,71 @@ MIAL67ThalamicNuclei-pipeline/
└─ sub-67_T1w.nii.gz
```

This folder structure can be generally applied when the atlas is derived into several
template spaces, for example:

```Text
MIAL67ThalamicNuclei-pipeline/
├─ atlas-MIAL67ThalamicNuclei_dseg.json
├─ atlas-MIAL67ThalamicNuclei_dseg.tsv
├─ label-ThalamicNuclei_dseg.json
├─ label-ThalamicNuclei_dseg.tsv
├─ tpl-MNI152NLin6Asym/
│ └─ anat/
│ ├─ tpl-MNI152NLin6Asym_atlas-MIAL67ThalamicNuclei_res-1_dseg.nii.gz
│ └─ tpl-MNI152NLin6Asym_atlas-MIAL67ThalamicNuclei_res-1_probseg.nii.gz
├─ tpl-MNI152NLin2009cAsym/
│ └─ anat/
│ ├─ tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_res-1_dseg.nii.gz
│ └─ tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_res-1_probseg.nii.gz
├─ sub-01
│ └─ anat/
│ ├─ sub-01_label-ThalamicNuclei_dseg.nii.gz
│ ├─ sub-01_space-MNI152NLin2009cAsym_T1w.nii.gz
│ └─ sub-01_T1w.nii.gz
└─ sub-67
└─ anat/
├─ sub-67_label-ThalamicNuclei_dseg.nii.gz
├─ sub-67_space-MNI152NLin2009cAsym_T1w.nii.gz
└─ sub-67_T1w.nii.gz
```

In the case the pipeline generated atlas-based segmentations of the original subjects in
their native T1w space (for example, to compare with the original segmentation given by
`label-ThalamicNuclei`), the above example translates into:

```Text
MIAL67ThalamicNuclei-pipeline/
├─ atlas-MIAL67ThalamicNuclei_dseg.json
├─ atlas-MIAL67ThalamicNuclei_dseg.tsv
├─ label-ThalamicNuclei_dseg.json
├─ label-ThalamicNuclei_dseg.tsv
├─ tpl-MNI152NLin6Asym/
│ └─ anat/
│ ├─ tpl-MNI152NLin6Asym_atlas-MIAL67ThalamicNuclei_res-1_dseg.nii.gz
│ └─ tpl-MNI152NLin6Asym_atlas-MIAL67ThalamicNuclei_res-1_probseg.nii.gz
├─ tpl-MNI152NLin2009cAsym/
│ └─ anat/
│ ├─ tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_res-1_dseg.nii.gz
│ └─ tpl-MNI152NLin2009cAsym_atlas-MIAL67ThalamicNuclei_res-1_probseg.nii.gz
├─ sub-01
│ └─ anat/
│ ├─ sub-01_atlas-MIAL67ThalamicNuclei_dseg.nii.gz
│ ├─ sub-01_label-ThalamicNuclei_dseg.nii.gz
│ ├─ sub-01_space-MNI152NLin2009cAsym_T1w.nii.gz
│ └─ sub-01_T1w.nii.gz
└─ sub-67
└─ anat/
├─ sub-67_atlas-MIAL67ThalamicNuclei_dseg.nii.gz
├─ sub-67_label-ThalamicNuclei_dseg.nii.gz
├─ sub-67_space-MNI152NLin2009cAsym_T1w.nii.gz
└─ sub-67_T1w.nii.gz
```

The next subsection describes this latter use-case in further depth.

## Filenames of derivatives with atlases in their provenance

Like for the [`space-` entity](../glossary.md#space-entities), outputs derived from atlases
Expand Down

5 comments on commit f159e61

@PeerHerholz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @oesteban! Just a quick question: would the transforms be derived in a different pipeline and indicated under "sources" in the json files?

@oesteban
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point -- I will address transforms ASAP. I agree it is a key aspect of this BEP, and should be reflected somewhere.

@PeerHerholz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The transforms between templates could be part of templateflow, right (I think there are already some)? There's also neuromaps, which has quite a few transforms ready to go. However, I'm not sure how this would then be linked to a given pipeline... For the template to subject space transforms: this could either re-use transforms computed during prior processing steps, e.g. fmriprep, or computed within the pipeline at hand. Sorry if I missed something obvious or if this is not aligned with your proposal. Thanks again for working on this!

@oesteban
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we should encourage/signal the importance of providing subject-to-standard transforms for the subjects that were used in the atlas/template creation.

In other words, if we had a BIDS-derivatives dataset from MNI templates which preserved all the transformations of each subject to each of their different templates, it would be crazy awesome (e.g., to then build template-to-template transforms).

TemplateFlow is definitely interested in template-to-template transforms, but a BIDS derivatives dataset from which drawing them should have also the subject-to-template transforms in it.

Let me work this a bit further and I hope that will give you a full (and specific) answer - wdyt?

@PeerHerholz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on all things you mentioned. Please let me know if I can be of any help!

Please sign in to comment.