Generate mask of an individual macaque monkey through NIMH D99 Atlas Note that the template inside D99 is as same as the Saleem & Logotheis atlas book: A Combined MRI and Histology Atlas of the Rhesus Monkey
- install FSL
- install nipype (might be not necessary in the future)
- Atlas (D99 is already embedded in the program)
The example file is taken from PRIME-MRM dataset Newcastle_prime-mrm/0000001/session_1/anat_1/.
The DICOM
images should be transformed into nii file first.
If you are using Ubuntu, you can use dcm2nii
to do the job. 3DSlicer
can also finish the job.
sudo apt install dcm2nii
run.py
file gives an example code to run a dataset contained in ./data_example/anta.nii
OFC 13b (306) and LIPv (329) are shown here.
Several files are generated:
rec_anta.nii.gz
orientation rectified nii file in rectified spacebet_anta.nii.gz
brain extracted nii file in original spacebetrec_anta.nii.gz
brain extracted orientation rectified nii file in rectified spacetpl_bet_rec_anta.nii.gz
brain extracted orientation rectified nii file in D99 template spacemask_306_13b_rec_anat.nii.gz
mask of the OFC 13b area in rectified spacemask_329_LIPv_rec_anat.nii.gz
mask of the OFC 13b area in rectified spacemask_306_13b_anat.nii.gz
mask of the OFC 13b area in original spacemask_329_LIPv_anat.nii.gz
mask of the OFC 13b area in original spacetpl_betrec_anat.mat
the transformation matrix from the rectified space to template spacetpl_betrec_anat_inv.mat
the transformation matrix from the template space to rectified spacetpl_betrec_bet_anat.mat
the transformation matrix from the rectified space to original spacetpl_EBZ_rec_anat.txt
ear bar zero (EBZ) in rectificed original space defined in D99 templatetpl_EBZ_anat.txt
ear bar zero (EBZ) in original space defined in D99 templatemerged_mask_rec_anat.nii.gz
merged mask in rectified spacemerged_mask_anat.nii.gz
merged mask in original space
You can use other atlas but it means you need to deeply modify the program. Atlas_generation.ipynb
is used to generate files in D99_mask
.
- The auto orientation detection is not correct for now, you need try different orientations using
dims
option inProcessNiiFile
function. - Only tested in macOS Monterey 12.5/13.2.1 with zsh