ANTs
ANTs copied to clipboard
ENH: Added bash script for ANTs tissue segmentation
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.
@ntustison : Hi Nick, please review this PR. Hope it helps the ants community.
Hi,
Does this differ from running individual stages of antsCorticalThickness.sh?
@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.
Thanks @aghayoor . I'll try to take a look tomorrow and follow up with any questions.
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.
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.
Thanks @aghayoor . Is there a reason why we can't just incorporate the improvements proposed by this script into the antsCorticalThickness.sh script?
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.
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?