You can just multiply the output by the value of the index you want, eg, fscalc final.nii.gz -mul 5 -o final.5.nii.gz Then give a different number to each label
On 4/11/2019 9:08 PM, Caroline Chwiesko wrote:
External Email - Use Caution
Hello Freesurfers developers,
I am very new to freesurfer. After getting the brainnetome parcellations using freesurfer, we need to convert the BN_Atlas.annot file from surface space into volumetric space. But the problem we have is that the converted labels have holes inside (see attached image 1). I am aware that this problem has been mentioned on this mailing list. But the suggested solution to use mri_label2vol –seg aparc + aseg.mgz will not work for us as the Brainnetome script does not output such files. We tried two different ways (see below), which did not result in success.
1. This command successfully brings the labels from surface to volumetric space but gives us the holes inside the labels.
Mri_label2vol --annot BN_Atlas.annot --subject 1000 --hemi lh --o xxxx/xxx/xxxxx/xxxxx/BN_Atlas.mgz --identity --temp xxx/xxxxxx/xxxxx/brain.mgz --proj frac 0 1 0.5
2. I emailed the Brainnetome authors and they suggested the command below. (In the command below I am trying to convert only 9 Brainnetome labels, just to see, if it will work).
mri_annotation2label --subject 1001_20180507_MPRAGE --hemi lh --annotation BN_Atlas --sd /tmp/yassamri/R21/caro/Freesurfer/Freesurfer --labelbase /tmp/yassamri/R21/caro/Freesurfer/Freesurfer/1001_20180507_MPRAGE/test/lh.BN
mri_label2vol --label lh.BN-000.label --label lh.BN-001.label --label lh.BN-003.label --label lh.BN-005.label --label lh.BN-007.label --label lh.BN-009.label --label lh.BN-009.label --label lh.BN-011.label --label lh.BN-013.label --subject 1001_20180507_MPRAGE --sd /tmp/yassamri/R21/caro/Freesurfer/Freesurfer/ --hemi lh --identity --fill-ribbon --o final.nii.gz
This approach results in converted labels in volumetric space without holes, but all the labels have the value 1 (see attached image 2). But we need to keep the correct Brainnetome label values in volumetric space. What command/options could I use to overcome the problem with the holes and convert the file BN_Atlas.annot into volumetric space
while keeping the Brainnetome label values?
Thank you very much for your help in advance!!
Carolin
Our freesurfer version:
freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c
we run it on Linux, kernel version 4.15.0-46-generic, Ubuntu 18.04.1 LTS
[image001.png] [Screen Shot 2019-04-11 at 5.46.19 PM.png]
_______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer