Brain ventricle parcellation instructions
Brain Ventricle Parcellation with Convolutional Neural Network
This singularity image contains the code and trained model for brain ventricle parcellation using a convolutional neural network. The singularity image can be downloaded in the following link (~1.7GB):.
If you use this work, please cite:
- Shao, M., Han, S., Carass, A., Li, X., Blitz, A.M., Shin, J., Prince, J.L. and Ellingsen, L.M., 2019. Brain ventricle parcellation using a deep neural network: Application to patients with ventriculomegaly. NeuroImage: Clinical, p.101871.
If you have any questions, please email Muhan Shao at
The singularity takes T1-w RAW brain MRI (nifti file) as input and performs the following steps:
- N4 bias field correction from ANTs. The bias field is estimated using a weight image calculated from a brain mask generated by ROBEX.
- Rigid registration to ICBM2009c nonlinear symmetric template using the ANTs package. The template images were resampled to have resolution of 0.8x0.8x0.8mm.
- Skull-stripping using ROBEX.
- Brain ventricle parcellation on the skull-stripped MNI-registered T1-w MRI using the method described in "Shao, M., et al., 2019. Brain ventricle parcellation using a deep neural network: Application to patients with ventriculomegaly. NeuroImage: Clinical, p.101871".
- The parcellation is transformed back to the original space using ANTs with the "MultiLabel" interpolation.
Output file structures
The processing will create subfolders
parc/ under the output folder. The final parcellation result is directly under the output folder.
*n4.nii.gzis the bias field corrected image
*n4_mni.nii.gzis the image in the MNI space
*n4_mni_strip.nii.gzis the skull-stripped image
*n4_mni_strip_seg.nii.gzis the parcellation from the convolutional neural networks
*n4_mni_strip_seg_inverse.nii.gzis the final parcellation result in the original image space.
- Install Singularity 3.7
- The Singularity image can only run on CPU although TensorFlow and Keras are used, because the Singularity image only contains the CPU version of TensorFlow.
- Assume that the Singularity image is
/path/to/simg/ventricle-parcellation.simg, the image to parcellate is
~/image.nii.gz, and the output folder is
singularity run /path/to/simg/ventricle-parcellation.simg -i ~/image.nii.gz -o ~/output
- If the
/path/to/imagewhich is not under your home directory
singularity run -B /path/to/image:/mnt /path/to/simg/ventricle-parcellation.simg -i /mnt/image.nii.gz -o /mnt/output
- Print help
singularity run ~/ventricle-parcellation.simg -h
Brain ventricle labels
"51": "Right lateral ventricle", "52": "Left lateral ventricle", "4": "third ventricle", "11": "fourth ventricle"