External Email - Use Caution
Hello Freesurfer community
I am trying to transform a label file obtained in subject native surface space to subject native volume space.
This label file was obtained through binarizing the subject lh.sulc morphological data through the function write.fs.label from R package freesurferformats, in the left hemisphere, resulting in a binary label for all sulci in the subject. Visual quality control of the label file through Freeview was adequate: I can load the surface label file with any surface of the subject.
Now, I would like to map the corresponding voxels that belong to sulci in the left hemisphere of this subject.
I tried to convert the label to volume using mri_label2vol first, but got the following error message
could not parse 48510th line '1e+05 -37.5524826049805 -5.55967617034912 18.56817436218261' in label file
I then tried to first convert the file to annot format using mris_label2annot and then convert to volume using mri_aseg2aparc. Similarly, mris_label2annot threw the error
could not parse 48510th line '1e+05 -37.5524826049805 -5.55967617034912 18.56817436218261' in label file
The list described similar errors but no obvious solution that I can access right now e.g. having a developer inspect the label file.
I would love to get any pointer as to why the label file may have been unparse-able to Freesurfer tools.
Sincerely
Yigu
Hi Yigu,
I'm trying to understand how you obtained the label file with R package functions. What is your R command to generate the label file, and how did you view it in freeview?
Here is some information about the label file - https://surfer.nmr.mgh.harvard.edu/fswiki/LabelsClutsAnnotationFiles
Besides the first two lines in the file, it needs 5 columns on each row. The error message suggested your label file doesn't follow the format on that line.
Best,
Yujing
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu On Behalf Of Yigu Zhou Sent: Tuesday, March 7, 2023 1:22 PM To: Freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] freesurfer could not parse freeview-loadable surface label
External Email - Use Caution
Hello Freesurfer community
I am trying to transform a label file obtained in subject native surface space to subject native volume space.
This label file was obtained through binarizing the subject lh.sulc morphological data through the function write.fs.label from R package freesurferformats, in the left hemisphere, resulting in a binary label for all sulci in the subject. Visual quality control of the label file through Freeview was adequate: I can load the surface label file with any surface of the subject.
Now, I would like to map the corresponding voxels that belong to sulci in the left hemisphere of this subject.
I tried to convert the label to volume using mri_label2vol first, but got the following error message
could not parse 48510th line '1e+05 -37.5524826049805 -5.55967617034912 18.56817436218261' in label file
I then tried to first convert the file to annot format using mris_label2annot and then convert to volume using mri_aseg2aparc. Similarly, mris_label2annot threw the error
could not parse 48510th line '1e+05 -37.5524826049805 -5.55967617034912 18.56817436218261' in label file
The list described similar errors but no obvious solution that I can access right now e.g. having a developer inspect the label file.
I would love to get any pointer as to why the label file may have been unparse-able to Freesurfer tools.
Sincerely
Yigu
External Email - Use Caution
Hi Yujing
I figured it out – it turns out the R package shifts vertex indices by 1 by default, I was able to fix the problem by changing the option to stop the index adjustment because I was merging information from two recon-all outputs so the vertices matched and did not need adjustment. It all works well now !
Best
Y
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Huang, Yujing YHUANG43@mgh.harvard.edu Date: Wednesday, March 8, 2023 at 10:36 To: Freesurfer support list freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] freesurfer could not parse freeview-loadable surface label You don't often get email from yhuang43@mgh.harvard.edu. Learn why this is importanthttps://secure-web.cisco.com/1AbNxYTuMpF90rjhN_X0z0HZgUY7NzG2-ZLq-MgFB6lWjapIwSxSMkkF0H_3UWlqVIa1eNje4CxTWWoSKDGYYaKapk-BVTRhjIJrubXeL4r_FrshX8nYDzGPQmDXLRrdUScsnkOAvRWtKg3XQdj-27k5woEyC35bJPg_bZZ0qIWZv6Xhj9FUj3sj36Wb7OrM5hyBan-2H1gY53BvzO4IIjW5n_mRqi4NLIyz0cUeezDQ6I6MxLuED7mrqgYEY3d039Cg1dyYBzj7jB-vSQ4qo8ijr_l9kWEe1bH_nZhiwxJ_u_bl1cJTpkM-QkfRgxopSS2fgE45zPYobY3FjbEePQg/https%3A%2F%2Faka.ms%2FLearnAboutSenderIdentification Hi Yigu,
I’m trying to understand how you obtained the label file with R package functions. What is your R command to generate the label file, and how did you view it in freeview?
Here is some information about the label file - https://secure-web.cisco.com/1kVu6_IiZScP9EYNWQitJjEIFJdUx0QuQH7iOdSfCbdff1Z...https://secure-web.cisco.com/1uDxySNuq_9_-MMs2CT-ED6FQkzIZHrooSJMYE-RxgRGs4CUR00R3_p5_6cbvWEpf4pD2W4bNdrqjkCT98sMrFzgg-qLlsjpm1lhJOKH0QbzbGk5vE1XTTQGJC6gAFDNmXdnETB8Asmm2HQmS0ZsRfprP3ybcfa7YNFlTDaEmBZPgqxfEjThlLBgl6puAX3rjBYKj-jy8HbxHBS2JvWyrsOXHTDkdzkDnPAz9Y-vPC36B3e5FIoD-txmQy9BFR_8L-XuQGAMBHp3vn91bsMdNEDT86UOwV5AfW3LNLUXvADjARwdjMo1x7xKog-kFLpmblNHPqLsIRMBDylNPtL3_Tw/https%3A%2F%2Fcan01.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Fsurfer.nmr.mgh.harvard.edu%252Ffswiki%252FLabelsClutsAnnotationFiles%26data%3D05%257C01%257Cyigu.zhou%2540mail.mcgill.ca%257C4572f09d23404026ef8e08db1feaf04a%257Ccd31967152e74a68afa9fcf8f89f09ea%257C0%257C0%257C638138866135664219%257CUnknown%257CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%253D%257C3000%257C%257C%257C%26sdata%3DhQZEGqub%252BpgWxF29I%252Fy6S%252BGQlbxQA%252BZPpnw0QNAwaXs%253D%26reserved%3D0
Besides the first two lines in the file, it needs 5 columns on each row. The error message suggested your label file doesn’t follow the format on that line.
Best,
Yujing
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu On Behalf Of Yigu Zhou Sent: Tuesday, March 7, 2023 1:22 PM To: Freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] freesurfer could not parse freeview-loadable surface label
External Email - Use Caution
Hello Freesurfer community
I am trying to transform a label file obtained in subject native surface space to subject native volume space.
This label file was obtained through binarizing the subject lh.sulc morphological data through the function write.fs.label from R package freesurferformats, in the left hemisphere, resulting in a binary label for all sulci in the subject. Visual quality control of the label file through Freeview was adequate: I can load the surface label file with any surface of the subject.
Now, I would like to map the corresponding voxels that belong to sulci in the left hemisphere of this subject.
I tried to convert the label to volume using mri_label2vol first, but got the following error message
could not parse 48510th line '1e+05 -37.5524826049805 -5.55967617034912 18.56817436218261' in label file
I then tried to first convert the file to annot format using mris_label2annot and then convert to volume using mri_aseg2aparc. Similarly, mris_label2annot threw the error
could not parse 48510th line '1e+05 -37.5524826049805 -5.55967617034912 18.56817436218261' in label file
The list described similar errors but no obvious solution that I can access right now e.g. having a developer inspect the label file.
I would love to get any pointer as to why the label file may have been unparse-able to Freesurfer tools.
Sincerely
Yigu
freesurfer@nmr.mgh.harvard.edu