Hi Julie

 

I don’t think we have anything that will do this out-of-the-box, but it should be easy enough to do in matlab or python. The label files are a text format and we provide .m and .py files to read them. Alternatively you could combine all the labels into a single parcellation file /subject/hemi and read that in (but it is not a text format)

 

Cheers

Bruce

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Julie Ottoy
Sent: Friday, July 17, 2020 10:59 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] Fwd: Fwd: question regarding mri_vol2label

 

        External Email - Use Caution        

Hi FS team,

 

I was wondering if you could take a look at the question below. Thanks!

 

---------- Forwarded message ---------
From: Julie Ottoy <julie.jj.ottoy@gmail.com>
Date: Fri, 10 Jul 2020 at 20:49
Subject: Re: [Freesurfer] Fwd: question regarding mri_vol2label
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>

 

Thank you for your reply. It worked to convert to surface label :)

When i overlay the surface labels on the pial surface, I can view a histogram showing the number of vertices versus the numbers of labels i have. As a follow-up question, do you know how I could extract a txt file that gives me the vertices with their corresponding label number. For example, for 10,000 vertices and 100 labels, I'd like to get a txt file with 10,000 rows and each row has a label value between 1 and 100.

 

Thank you for your help!

 

On Fri, 10 Jul 2020 at 16:28, Douglas N. Greve <dgreve@mgh.harvard.edu> wrote:

That will create a volume label, not a surface label (but it should not have been empty -- look in the label (it is just a text file)). To get a surface label, first map the volume to the surface with something like
mri_vol2surf --mov parcellationvolumes.nii.gz --projfrac-max -.5 1 .1 --hemi lh --o lh.parcellationvolumes.mgz --regheader subject
 mri_cor2label --i lh.parcellationvolumes.mgz --id 20 --surf subject lh --l lh.20.label

On 7/10/2020 3:46 PM, Julie Ottoy wrote:

        External Email - Use Caution        

Hi Freesurfer team

 

I am trying to convert parcellation (cortical) volumes that I acquired through another platform into surface labels using freesurfer. I tried following code to convert the volume with ID 20 from the parcellationvolumes.nii.gz file into a label

 

mri_cor2label  --i dir/parcellationvolumes.nii.gz --id 20 --l dir/20.label

 

Although the code runs fine and finishes successfully, whenever I try to open the created label in freeview, it says that the label is empty.

 

Any idea what I am doing wrong? Do you have an easier way to project all ROI volumes onto the surface?

 

A second related question: I have run the recon-all for T1 of the subject and it creates rh.pial and lh.pial. I was wondering whether the transformation to go from T1 volume to the surface is saved somewhere and whether I can apply this transformation to convert my cortical volume parcellations into surface parcellations?

 

Thank you for your help!

Best regards

Julie

 

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

 

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer