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

ENH: Added bash script for ANTs tissue segmentation #1145

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

Conversation

aghayoor
Copy link
Collaborator

ANTs Atropos and antsAtroposN4.sh need all the priors already warped to the subject space before the segmentation is run. This developed script combines the registration step with antsAtroposN4 run.

This script runs:

  • brain extraction
  • template registration
  • atropos segmentation
  • (optional) register to template space
  • QC (mosaic QC image)

This script was adopted and modified from antsCorticalThickness.sh,
so it follows similar command line convention.

This script was tested on several arbitrarily selected
subject/templates, and it ran successfully and generated the requested outputs.

ANTs Atropos and antsAtroposN4.sh need all the priors already warped to the subject space before the segmentation is run. This developed script combines the registration step with antsAtroposN4 run.

This script runs:
- brain extraction
- template registration
- atropos segmentation
- (optional) register to template space
- QC (mosaic QC image)

This script was adopted and modified from antsCorticalThickness.sh,
so it follows similar command line convention.

This script was tested on several arbitrarily selected
subject/templates, and it ran successfully and generated the requested outputs.
@aghayoor
Copy link
Collaborator Author

@ntustison : Hi Nick, please review this PR. Hope it helps the ants community.

@cookpa
Copy link
Member

cookpa commented Feb 25, 2021

Hi,

Does this differ from running individual stages of antsCorticalThickness.sh?

@aghayoor
Copy link
Collaborator Author

@cookpa :
It generates less confusion. For example when you want to skip just one middle step of antsCorticalThickness.
Can you skip only step "5: DiReCT cortical thickness" and run all other steps (including QC) just by using command line? For this I was using a hacky solution to copy needed OutputNameACTStageNComplete.txt to the output directory.

However, this script is dedicated to tissue segmentation and can reliably be used in segmentation workflows.

@ntustison
Copy link
Member

Thanks @aghayoor . I'll try to take a look tomorrow and follow up with any questions.

@ntustison
Copy link
Member

Is this only applicable to the scenario mentioned above where you want to perform up to the segmentation stage and then skip to quality control? If so, this would seem to have significant redundancy where we could just edit antsCorticalThickness.sh to perform segmentation-based QC immediately after the segmentation stage.

@aghayoor
Copy link
Collaborator Author

Yes, it basically removes the step "5: DiReCT cortical thickness" and trims the code and the command line so it is only dedicated to segmentation.

@ntustison
Copy link
Member

Thanks @aghayoor . Is there a reason why we can't just incorporate the improvements proposed by this script into the antsCorticalThickness.sh script?

@aghayoor
Copy link
Collaborator Author

aghayoor commented Mar 1, 2021

Hi @ntustison ,
I think we can add developments to antsCorticalThickness pipeline, so it can skip a specific stage.
However, it was my preference to make a dedicated pipeline for segmentation because each part of this pipeline needed to be validated.
We can also further develop this pipeline so it does not need the input priors in a specific order the way that antsCorticalThickness requires that.

@ntustison
Copy link
Member

I can appreciate needing each part of the segmentation pipeline to be validated but, correct me if I'm wrong, isn't the segmentation pipeline simply a subset of the cortical thickness pipeline?

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

Successfully merging this pull request may close these issues.

3 participants