Skip to content

USC-LoBeS/smacc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMACC-MRI:

Segment, Measure and AutoQC the midsagittal Corpus Callosum

This automated pipeline can be used for accurate Corpus Callosum (CC) segmentation across multiple MR modalities (T1, T2 and FLAIR) and extract a variety of features to describe the shape of the CC. We also include an automatic quality control function to detect poor segmentations using Machine Learning.

workflow

How to use the tool:

Clone the github directory using:

git clone https://github.com/ShrutiGadewar/smacc.git

Virtual environment:

Navigate to the "smacc" folder and then create a virtual environment using the requirements.txt file:

conda create -n smacc python==3.11 -y
conda activate smacc
pip install -r requirements.txt
pip install .

Input Preprocessing:

All the MR images should be registred to MNI 1mm template(182 X 218 X 182) with 6dof. You can use the template provided in the "model" folder on github. You can use the FSL's flirt command for linear registration:

flirt -in ${inpdir}/${subj}.nii.gz \
	-ref ${MNI_1mm_template} \
  	-out ${outdir}/${subj} \
 	-dof 6 \
  	-cost mutualinfo \
  	-omat ${outdir}/matrices/${subj}_MNI_6p.xfm

Test the tool:

smacc -f ./subject_list.txt -o ./smacc_output -m t1

-f : Text file with a list of absolute paths to the niftis to be processed and names to save the outputs for each subject. Check example text file "subject_list.txt" provided.
-o : Absolute path of output folder
-m : Modality of the images to be processed (t1/t2/flair)
-q : Optional flag to perform Automated QC on the segmentations
The final output is a csv which will contain all the extracted shape metrics and a column "QC label" indicating whether the segmentations were accurate(0)/fail(1) if the QC flag is provided.

If you use this code, please cite the following papers:

  1. Gadewar SP, Nourollahimoghadam E, Bhatt RR, Ramesh A, Javid S, Gari IB, Zhu AH, Thomopoulos S, Thompson PM, Jahanshad N. A Comprehensive Corpus Callosum Segmentation Tool for Detecting Callosal Abnormalities and Genetic Associations from Multi Contrast MRIs. Annu Int Conf IEEE Eng Med Biol Soc. 2023 Jul;2023:1-4, PMID: 38083493. https://doi.org/10.1109/embc40787.2023.10340442

  2. Bhatt, R.R., Gadewar, S.P. et al. The Genetic Architecture of the Human Corpus Callosum and its Subregions. Nat Commun 16, 9708 (2025). https://doi.org/10.1038/s41467-025-64791-3

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages