Adding laussane2018 atlas to the mrtrix

80 views
Skip to first unread message

milad najafzadeh

unread,
May 12, 2022, 8:45:16 AM5/12/22
to cmtk-users
Dear experts , 


For a project, I am trying  to add laussane2018 parcellation to the mrtrix software without using of cmp3. I use the following link  to obtain atlas data (https://github.com/connectomicslab/CMTKLIB-data) and for  adding the atlas In my pipeline, I utilize the following codes:


1-  mri_surf2surf --srcsubject fsaverage  --trgsubject sub-40451 --hemi lh --sval-annot $SUBJECTS_DIR/fsaverage/label/lh.lausanne2018.scale1.annot --tval $SUBJECTS_DIR/sub-40451/label/lh.lausanne2018-atlas.scale1.annot



 2-mri_surf2surf --srcsubject fsaverage  --trgsubject sub-40451 --hemi rh --sval-annot $SUBJECTS_DIR/fsaverage/label/rh.lausanne2018.scale1.annot --tval $SUBJECTS_DIR/sub-40451/label/rh.lausanne2018-atlas.scale1.annot



3- mri_aparc2aseg --old-ribbon --s sub-40451 --annot lausanne2018.scale1  --annot-table $SUBJECTS_DIR/lausanne2018.scale1_FreeSurferColorLUT.txt   --o $SUBJECTS_DIR/lausanne2018-atlas_scale1_wo_surf2surf.mgz


 4- mrconvert –datatype uint32 lausanne2018-atlas_scale1.mgz  lausanne2018-atlas_scale1_uint32.mif


5- labelconvert  lausanne2018-atlas_scale1_uint32.mif  lausanne2018.scale1_FreeSurferColorLUT.txt resolution1_LUT.txt
lausanne2018-atlas_uint32_labelcon_scale1.mif

but after running the code in the step 5, I encounter the following warning massage:

labelconvert: [WARNING] Unexpected values detected in input image; suggest checking input image thoroughly

when  I try to  see  the lausanne2018-atlas_uint32_labelcon_scale1.mif   using mrview, no atlas data are seen in  the software. I think that the problem is due to inconsistency between the annotation files and  LUT data. 

Do you have any suggestion?

Thanks in advance your helps,

cheers,

-Milad

Sebastien Tourbier

unread,
Jun 1, 2022, 1:21:52 AM6/1/22
to cmtk-users
Hi Milad,

Sorry to get back to you on this only now. It seems my recent messages related to the cmtk-users group went into my spams. This should be now fixed.

I would recommend you to ignore this repository, which is very experimental. This was indeed part of a test to separate the resources (heavy files) of cmp3 that are not employed by the cmpbidsappmanager GUI to be able to publish it to PyPI.

The solution employed now in cmp3 is to use two different setup.py package installation files:
- setup.py: provide a full installation of all modules of cmp3 (including all files in cmtklib/data)
- setup_pypi.py: provide a light-weight installation of cmp3 (which should include all resource files related to parcellations - cmtklib/data/parcellation - but does not contain any resources related to brain segmentation - cmtklib/data/segmentation.

The problem here is that the labels are defined in the Freesurfer range in the annot files but are from 1 to n (#ROIs) in the color LUT.
This is indeed handled by the parcellation stage of cmp3.
Thus, in your case, I would run only the anatomical pipeline of cmp3 with Lausanne2018. This would generate consistent FreeSurfer color LUT and volumetric parcellation files.

Note also that cmp3 create dynamically the _FreesurferColorLUT.txt, _dseg.tsv, _dseg.graphml, and _stats.tsv as Lausanne 2018 can also but not necessarily include extra segmented structures such as the the thalamic nuclei.

Let me know if you have further questions.

Best,
Seb

milad najafzadeh

unread,
Jun 11, 2022, 2:18:03 PM6/11/22
to cmtk-users
Dear Sebastien

Many thanks to your helps. I have changed my pipeline  to use cmp3.

-Best regards

-Milad
Reply all
Reply to author
Forward
0 new messages