Add support for 5ttgen deep_atropos to enable 5TT image generation with ANTsPyNet Atropos segmentation #3053
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a new option to the 5ttgen script: 5ttgen deep_atropos.
Summary of Changes:
A new script: lib/mrtrix3/_5ttgen/deep_atropos.py.
This option leverages ANTsPyNet’s antspynet.deep_atropos for tissue segmentation, addressing challenges with lesion-affected T1-weighted images.
Tissue intensity mappings in the generated deep_atropos.nii.gz are as follows:
1 = CSF
2 = GM
3 = WM
4 = SCGM
5 = Brainstem (BS)
6 = Cerebellum (CER)
Brainstem (BS) and Cerebellum (CER) are treated as white matter (WM) to align with the nature of the segmentation results.
Why This Is Useful:
Lesion-affected brain images often produce poor results with existing 5ttgen options such as:
5ttgen fsl
5ttgen freesurfer
5ttgen hsvs
These methods can fail to correctly segment grey matter (GM) due to lesion intensity changes, resulting in incorrect tissue assignments.
The deep_atropos option provides a robust alternative for T1 images in such cases.
Testing and Feedback:
The changes have been tested, but further validation and review by others would be highly appreciated to confirm reliability across various datasets.