Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 5ttgen deep_atropos to enable 5TT image generation with ANTsPyNet Atropos segmentation #3053

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LucSam
Copy link

@LucSam LucSam commented Dec 17, 2024

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.

@LucSam LucSam force-pushed the 5ttgen_deep_atropos branch 2 times, most recently from 9adf745 to c308543 Compare December 17, 2024 19:20
git log --oneline

Added support for deep_atropos in 5ttgen script

Prepare for PR: Add 5ttgen deep_atropos functionality

Add support for deep_atropos in 5ttgen script
@Lestropie
Copy link
Member

Hi Lucius,

As per contributing guidelines, the change will need to be proposed as an addition to the dev branch rather than master. It looks like the commit you have generated also erroneously includes deletion of a whole lot of unrelated files, which will need to be rectified. Rather than trying to rescue this PR, you are likely better off making a fresh feature branch off of the current dev branch, manually adding just that one file in a new commit, and then creating a new PR with dev as the target branch.

There's been some structural and syntax Python changes on dev, so see how you go getting your code working there. If you get stuck, just commit what you've got and create a PR, and I can help from there.

Cheers
Rob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants