External Email - Use Caution        

Hi again and sorry for the very confusing questions...


I now (without really knowing what I did) managed to get

mris_convert --annot left.fsaverage_MY_PARC_2_164.label.gii 
fs_L-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii 
lh.MY_PARC_164k_1.annot

to run without errors. However it creates an .annot file with a rh.lh -prefix, 
eg rh.lh.MY_PARC_164k_1.annot

I've checked multiple times that the .label.gii file used as input is really 
Left Hemisphere. I tried just renaming the .annot file but then

mri_aparc2aseg --old-ribbon --s subject --annot MY_PARC_164k_1 --o 
MY_PARC_164k_1.mgz

gives the following error


Loading lh annotations from ~/subjects_dir/subject/label/lh.MY_PARC_164k_1.annot
error: No such file or directory
error: # elements (163842) in 
~/subjects_dir/subject/label/lh.MY_PARC_164k_1.annot and # vertices (154818) 
don't match
ERROR: MRISreadAnnotation() failed 
~/subjects_dir/subject/label/lh.MY_PARC_164k_1.annot


best and thanks for the help

karin

________________________________
From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Huang, Yujing 
<yhuan...@mgh.harvard.edu>
Sent: Thursday, February 29, 2024 10:59:50 PM
To: Freesurfer support list
Subject: Re: [Freesurfer] [ext] Re: mris_convert reading surf.gii files?

All these filenames are too similar. You mentioned at least 3 different files.

mris_info                         
fs_R-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii     (error)
mris_info                         
fs_R-to-fs_LR_fsaverage.R_LR.spherical_std.164k_fs_R.surf.gii    (ok)
mris_convert                 
fs_L-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii     (error)
ls -lt                                   
fs_L-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii      (ok)

Make sure the file exists and provide full path to mris_info/mris_convert 
command.

If you continue to have problems with mris_info/mris_convert, share the .gii 
and we will take a closer look.

Best,

Yujing

From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> On Behalf Of Westin, Karin
Sent: Thursday, February 29, 2024 4:41 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] [ext] Re: mris_convert reading surf.gii files?


        External Email - Use Caution

Hi again this gives


ls -lt fs_L-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii
-rw-rw-r-- 1 karin karin 4323015 feb 29 21:54 
fs_L-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii
best

karin

________________________________
From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 on behalf of Huang, Yujing 
<yhuan...@mgh.harvard.edu<mailto:yhuan...@mgh.harvard.edu>>
Sent: Thursday, February 29, 2024 10:29:25 PM
To: Freesurfer support list
Subject: Re: [Freesurfer] [ext] Re: mris_convert reading surf.gii files?

It seems to me that it failed to open the .gii file.

Can you check if 
‘fs_R-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii’ exists and you 
have the read permission?
‘ls -lt fs_R-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii’



From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Westin, Karin
Sent: Thursday, February 29, 2024 4:09 PM
To: Freesurfer support list 
<freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] [ext] Re: mris_convert reading surf.gii files?


        External Email - Use Caution

Hi I realized that the error occurs only with the Lh- file, that also gives 
this error


mris_info fs_R-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii
** failed to open GIFTI XML file 
'fs_R-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii'
gifti_read_image() returned NULL

Is this a freesurfer error or is there something with the file?



thanks

Karin

________________________________
From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 on behalf of Huang, Yujing 
<yhuan...@mgh.harvard.edu<mailto:yhuan...@mgh.harvard.edu>>
Sent: Thursday, February 29, 2024 10:05:36 PM
To: Freesurfer support list
Subject: Re: [Freesurfer] [ext] Re: mris_convert reading surf.gii files?

The output from mris_info looks fine.

Are you still having trouble creating .annot file from a label.gii file? The 
command looks like this:

mris_convert --annot label/rh.aparc.annot.gii surf/rh.white.gii rh.aparc.annot

You need to provide full path to your input files.

Best,

Yujing

From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Westin, Karin
Sent: Thursday, February 29, 2024 2:40 PM
To: Freesurfer support list 
<freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] [ext] Re: mris_convert reading surf.gii files?


        External Email - Use Caution

Hi



Thank you for your reply! mri_info
 mris_info fs_R-to-fs_LR_fsaverage.R_LR.spherical_std.164k_fs_R.surf.gii
returns the follwoing:


==================================================
gifti_image struct
    version    = 1
    numDA      = 2
gim->meta nvpairs struct, len = 4 :
    nvpair: 'Caret-Version' = '5.65'
    nvpair: 'Date' = '2013-03-25T14:06:59'
    nvpair: 'UniqueID' = '{ca14b266-2bf9-4910-8f46-7faecc9e1946}'
    nvpair: 'encoding' = 'XML'

gim->labeltable giiLabelTable struct, len = 1 :
    key 0, rgba (1.000, 1.000, 1.000, 0.000), label '???'

--------------------------------------------------
gim->darray[0] giiDataArray struct
    intent   1008 = NIFTI_INTENT_POINTSET
    datatype   16 = NIFTI_TYPE_FLOAT32
    ind_ord     1 = RowMajorOrder
    num_dim       = 2
    dims          = 163842, 3, 0, 0, 0, 0
    encoding    3 = GZipBase64Binary
    endian      2 = LittleEndian
    ext_fname     =
    ext_offset    = 0
darray->meta nvpairs struct, len = 9 :
    nvpair: 'AnatomicalStructurePrimary' = 'CortexRight'
    nvpair: 'AnatomicalStructureSecondary' = 'MidLayer'
    nvpair: 'Caret-Version' = '5.64'
    nvpair: 'Date' = '2011-12-15T15:06:35'
    nvpair: 'GeometricType' = 'Spherical'
    nvpair: 'UniqueID' = '{1adeebae-d730-4e6c-8e93-b14805a6139f}'
    nvpair: 'comment' = 'Imported from rh.sphere
scaled to fsaverage.rh.Midthickness_mni.mws.164k_fs.coord
Deformation Map File: fsaverage.R.registered-to-fs_LR.164k_fs_LR.deform_map
Deformation Map File: fsaverage.R.registered-to-fs_LR.164k_fs_LR.deform_map
Deformation Map File: fsaverage.R.registered-to-fs_LR.164k_fs_LR.deform_map
Deformation Map File: fsaverage.R.registered-to-fs_LR.164k_fs_LR.deform_map
Deformation Map File: fsaverage.R.registered-to-fs_LR.164k_fs_LR.deform_map'
    nvpair: 'configuration_id' = 'Unknown'
    nvpair: 'topo_file' = 'fsaverage.R.closed.164k_fs_R.topo'

darray->coordsys giiCoordSystem struct
    dataspace  = NIFTI_XFORM_TALAIRACH
    xformspace = NIFTI_XFORM_TALAIRACH
    xform[0] :  1.000000  0.000000  0.000000  0.000000
    xform[1] :  0.000000  1.000000  0.000000  0.000000
    xform[2] :  0.000000  0.000000  1.000000  0.000000
    xform[3] :  0.000000  0.000000  0.000000  1.000000
    data       = <set>
    nvals      = 491526
    nbyper     = 4
    numCS      = 1
darray->ex_atrs nvpairs struct, len = 0 :
--------------------------------------------------
--------------------------------------------------
gim->darray[1] giiDataArray struct
    intent   1009 = NIFTI_INTENT_TRIANGLE
    datatype    8 = NIFTI_TYPE_INT32
    ind_ord     1 = RowMajorOrder
    num_dim       = 2
    dims          = 327680, 3, 0, 0, 0, 0
    encoding    3 = GZipBase64Binary
    endian      2 = LittleEndian
    ext_fname     =
    ext_offset    = 0
darray->meta nvpairs struct, len = 5 :
    nvpair: 'Caret-Version' = '5.616'
    nvpair: 'Date' = '2011-01-24T21:13:13'
    nvpair: 'TopologicalType' = 'Closed'
    nvpair: 'UniqueID' = '{15ec5dcb-b08c-420e-a8f9-057cbd2c0706}'
    nvpair: 'comment' = 'Imported from rh.sphere'

    data       = <set>
    nvals      = 983040
    nbyper     = 4
    numCS      = 0
darray->ex_atrs nvpairs struct, len = 0 :
--------------------------------------------------
gifti_image struct
    swapped    = 0
    compressed = 1
 -- darray totals: 6 MB
gim->ex_atrs nvpairs struct, len = 2 :
    nvpair: 'xmlns:xsi' = 'true'
    nvpair: 'xsi:noNamespaceSchemaLocation' = 'true'

==================================================
Best

Karin

________________________________
From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 on behalf of Huang, Yujing 
<yhuan...@mgh.harvard.edu<mailto:yhuan...@mgh.harvard.edu>>
Sent: Monday, February 26, 2024 4:21:01 PM
To: Freesurfer support list
Subject: [ext] Re: [Freesurfer] mris_convert reading surf.gii files?

Your mris_convert command looks correct. I’m able to do the conversion like 
this with dev version:

mris_convert --annot label/rh.aparc.annot.gii surf/rh.white.gii rh.aparc.annot

I’m wondering which Freesurfer you are running. If you do ‘mris_info surf.gii’, 
what does it report?

Best,

Yujing

From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
<freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Westin, Karin
Sent: Saturday, February 24, 2024 6:10 PM
To: freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
Subject: [Freesurfer] mris_convert reading surf.gii files?


        External Email - Use Caution

Hi



I'm trying to create an .annot file from a label.gii file using an HCP 
fsavarage.surf.gii file (eg mris_convert --annot my_label.label.gii 
fsaverage_template.L.surf.gii lh.my_annot.annot). However I keep getting the 
error



** failed to open GIFTI XML file 
'fs_L-to-fs_LR_fsaverage.L_LR.spherical_std.164k_fs_L.surf.gii'

mrisReadGIFTIdanum: gifti_read_image() returned NULL

Is there a better way to read/open CIFTI files using mris_convert?

Best and thanks
Karin

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 

Reply via email to