Hi Nys
The issue is that the .gcs is more complicate than just a set of labels/priors in space. It also contains distributional information (means and variances of geometric measures) and markov priors (neighborhood
probabilities stored in the two principal directions)
Cheers
Bruce
From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu>
On Behalf Of Siegel, Nys Tjade
Sent: Wednesday, August 7, 2024 10:58 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] [ext] Re: Question/potential bug regarding mri_convert and .gca files
External Email - Use Caution
Hi Yujing,
thanks for your reply.
What I would like to do is the equivalent of
mri_convert atlas.gca -nth 1 labels.mgz
just for a cortical parcellation (.gcs). In other words, get the cortical atlas' labels in 3D space. I hope I'm not conceptually lost...
Best regards,
Nys Tjade
From:
freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU>
Sent: Wednesday, August 7, 2024 4:34:31 PM
To: Freesurfer support list
Subject: Re: [Freesurfer] [ext] Re: Question/potential bug regarding mri_convert and .gca files
‘mris_ca_label’ will produce an annotation file -
https://surfer.nmr.mgh.harvard.edu/fswiki/mris_ca_label. Is that what you are looking for?
The mri_convert command should work. After the conversion, you can use ‘mri_diff’ to confirm they are the same.
Yujing
From:
freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu>
On Behalf Of Siegel, Nys Tjade
Sent: Wednesday, August 7, 2024 9:14 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] [ext] Re: Question/potential bug regarding mri_convert and .gca files
External Email - Use Caution
Hi Bruce,
thank you for pointing out the difference between .gca and .gcs, I missed that...
Still, I don't manage to extract volumetric labels from the .gcs file. I've tried
mris_convert without success, and I'm unsure whether it is the right command, because it is used for "converting between difference cortical surface file formats", whereas I would like to extract volumetric atlas labels.
I figured that /subjects/fsaverage/mri/aparc+aseg.mgz comes really close to what I am looking for, which is cortical labels in the volumetric space, for an average participant. Does that sound about
right to you?
When I try to convert the aparc+aseg.mgz to a .nii file, which I could finally use in Python, however, the volume looks way different after the conversion (I'm trying
mri_convert aparc+aseg.mgz ~/aparc+aseg.nii). Do I miss a flag?
Also, if there is Matlab code that helps me to extract volumetric labels from the .gcs file, I would gladly take it.
Best regards and much appreciation for your help,
Nys Tjade
From:
freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Fischl, Bruce R.,PHD <BFISCHL@mgh.harvard.edu>
Sent: Monday, August 5, 2024 11:34:31 PM
To: Freesurfer support list
Subject: [ext] Re: [Freesurfer] Question/potential bug regarding mri_convert and .gca files
Hi Nys
.gcs is a different format for storing different information (surface-based parcellation) than .gca, so mri_convert won’t be able to read it. There might be matlab code for loading .gcs files if you want. Or maybe
mris_convert? I’m not sure, possibly someone else can take a look?
Cheers
Bruce
From:
freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu>
On Behalf Of Siegel, Nys Tjade
Sent: Monday, August 5, 2024 9:02 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Question/potential bug regarding mri_convert and .gca files
External Email - Use Caution
Dear Freesurfer community,
I'm trying to extract labels from a .gca atlas volume using the following command:
mri_convert atlas.gca -nth 1 labels.mgz (from
https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GcaFormat)
I've found a .gca file in the /average folder for which this works (RB_all_2020-01-02.gca), but for the cortical parcellations I'm actually interested in (e.g. lh.DKTatlas40.gcs), I get the following
error:
ERROR: cannot determine file type for lh.DKTatlas40.gcs
I'm pretty confused, because the documentations, as well as other support requests, are pretty clear on that my problem should be solved using the mentioned command. Notably, mri_convert -u,
does not list GCA under the supported file-types, maybe this is a versioning issue?
I'm using freesurfer 7.2.0 with Ubunutu 22.04.4.
Any help is much appreciated.
Best regards,
Nys Tjade Siegel