��������������


______________________
Shasha Li MD, PhD
Assistant Professor, Martinos Center/Radiology
(She/her/hers)

Massachusetts General Hospital
149 13th Street, Charlestown MA 02129
T 617-642-0449
massgeneral.org


From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of freesurfer-request@nmr.mgh.harvard.edu <freesurfer-request@nmr.mgh.harvard.edu>
Sent: Thursday, February 29, 2024 5:00:01 PM
To: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
Subject: Freesurfer Digest, Vol 240, Issue 19
 
Send Freesurfer mailing list submissions to
        freesurfer@nmr.mgh.harvard.edu

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
or, via email, send a message with subject or body 'help' to
        freesurfer-request@nmr.mgh.harvard.edu

You can reach the person managing the list at
        freesurfer-owner@nmr.mgh.harvard.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Freesurfer digest..."


Today's Topics:

   1. Re: Support Request NextBrain (Sorby-Adams, Annabel)
   2. Re: Longitudinal Freesurfer in the presence of large tissue
      defects (Philip P)
   3. mri_synthseg fails with current model files (was Re: Support
      Request NextBrain) (fsbuild)
   4. Re: [ext] Re:  mris_convert reading surf.gii files?
      (Westin, Karin)
   5. Re: [ext] Re:  mris_convert reading surf.gii files?
      (Huang, Yujing)
   6. Re: [ext] Re:  mris_convert reading surf.gii files?
      (Westin, Karin)
   7. Re: Creating a custom registration template with FreeSurfer
      template (Huang, Yujing)
   8. Re: [ext] Re:  mris_convert reading surf.gii files?
      (Huang, Yujing)
   9. Re: [ext] Re:  mris_convert reading surf.gii files?
      (Westin, Karin)
  10. Re: [ext] Re:  mris_convert reading surf.gii files?
      (Huang, Yujing)


----------------------------------------------------------------------

Message: 1
Date: Thu, 29 Feb 2024 01:11:25 +0000
From: "Sorby-Adams, Annabel" <ASORBY-ADAMS@mgh.harvard.edu>
Subject: Re: [Freesurfer] Support Request NextBrain
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Cc: fsbuild <fsbuild@contbay.com>
Message-ID: <CF02DF80-4A65-4780-85A0-26F4D30B59B4@mgh.harvard.edu>
Content-Type: text/plain; charset="utf-8"

Hi Helen,

I managed to run mri_synthseg on my M2 Mac by coping over the model file to the 7.3.2 version of freesurfer, and installing the tensorflow workaround previously posted on the forum for apple silicon machines.

I have not been able to get it to work on the 7.4 or most recent dev versions unfortunately. The work around for 7.3.2 isn?t ideal, but does the trick.

Freesurfer gurus may have more insight though!
Annabel


On 28 Feb 2024, at 20:03, Friedrich, Helen <hfriedrich@bwh.harvard.edu> wrote:

?
Hi R,

Thanks for your quick response.

We actually did that initially and it did not work unfortunately.

Could you provide me with segmentations for a certain scan? Or do you see any other possibility to make it work?

Best,

Helen



______________________

Helen Friedrich, B.Sc.


Doctoral Student

Netstim Laboratory

Center for Brain Circuit Therapeutics

Department of Neurology

Harvard Medical School


Brigham and Women?s Hospital

75 Francis St, Boston MA 02115

brighamandwomens.org




<Outlook-rrf3zs4o.png>



________________________________
Von: fsbuild <fsbuild@contbay.com>
Gesendet: Mittwoch, 28. Februar 2024 17:20
An: freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edu>
Cc: Friedrich, Helen <hfriedrich@bwh.harvard.edu>
Betreff: Re: [Freesurfer] Support Request NextBrain


        External Email - Use Caution


The mri_synthseg script and python in the freesurfer disrtibution you are running are not entirely compatible with the arm64 M1, M2, M3 processors in silicon Macs.   You could try installing and running the development build of Freesurfer for the silicon Mac via the link below.  (After download, right click on the .pkg installer, and select open with default, then follow the prompts).

https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/dev/freesurfer-macOS-darwin_arm64-dev.pkg

We would be interested to know if you run into such issues with the above development build.  Please keep in mind a development build can be unstable and has not been tested like an actual release.  Your numerical result may differ with the development build compared to the previous build/release.

- R.

On Feb 28, 2024, at 14:25, Friedrich, Helen <hfriedrich@bwh.harvard.edu> wrote:

Dear Support Team,

I'm reaching out for assistance with setting up NextBrain - mri_synthseg.

Unfortunately, I could not make it work. There seems to be an issue with the np.float128-section. This error keeps showing up:
<image.png>
I have also tried to delete np.float128 from the script (as per suggestion from my colleague). However, the same error showed up.

I'm working on a macOS M1.

I would be very grateful for your assistance.

Best,

Helen
______________________
Helen Friedrich, B.Sc.

Doctoral Student
Netstim Laboratory
Center for Brain Circuit Therapeutics
Department of Neurology
Harvard Medical School

Brigham and Women?s Hospital
75 Francis St, Boston MA 02115
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be brighamandwomens.org<http://secure-web.cisco.com/17q0ctEVbQ3PCi9RlB5rYtmqkWfH8bL_7IwtwRdv14OcX42Cy5RGky-XB-0b4PnbeeGBAfXTMTLTRX-p57tEsbI5vW_0CmLpsR6qPrVdrYInM66z2LZ-9yzHztozN1ErYK5vT7WRc_mBNkY8FQi8ORvvDnVCBLFxaAGE3Z6rQ29FKti1O1ZTc8dR9CBlne7JJzI1uYD6pDxOy7dLc0XsQDsxZW2YKaCzlULMe3iSYHi3grmHnQnUQZ6SSoyShDbvqjZaU6y3VaYEX9znEgasgZFOWp86NMtXdNh-cUbM4I2TAE7h7jFP4kKgvJ27TD5m-Fl87eXr85UfCXoc4D1t5Fg/http%3A%2F%2Fbrighamandwomens.org%2F>



 <Outlook-jaw0jfh4.png>



_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be MailScanner has detected a possible fraud attempt from "mail.nmr.mgh.harvard.edu" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/1rtWoOggy348yAexwX2GFQkliC-8Cc9lypKqh3QJHEwErLDEhDlSF_San-NNDmXp73a91nfltIQmhoAzr7W5pNy-sfULGDa5ydAUMkTblE2J1mDMH4iSZEUQdC0NJ2HZ-X3ucxd1qYXCohILM9_yJEjrVggj6AD_GZpeY_-ZlCT9pvsgJKef62hO4RQmi7QvNX9MstMsUenbZc_a9m4jDlya39TCcilfddOin9Fan1jfjr_G5gMDCsVvNsXiSBT0PowtVr-ZBF-0zIUydr_yqr1QeMO3chhRnJiw1lhqnCPFhD8LysbaLPa49cGGxtIUs0OSxLZ0vm3KxaQecSBoVLA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/b37501a1/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-rrf3zs4o.png
Type: image/png
Size: 98314 bytes
Desc: Outlook-rrf3zs4o.png
Url : http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/b37501a1/attachment-0001.png

------------------------------

Message: 2
Date: Thu, 29 Feb 2024 12:41:16 +1100
From: Philip P <philip.pruckner@gmail.com>
Subject: Re: [Freesurfer] Longitudinal Freesurfer in the presence of
        large tissue defects
To: "Hoffmann, Malte,PhD" <MHOFFMANN@mgh.harvard.edu>
Cc: "freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu>
Message-ID: <362DA963-C61B-49D1-B1C8-E7EF8B8F1F0D@gmail.com>
Content-Type: text/plain; charset="utf-8"

        External Email - Use Caution       

Hi Malte,

Thanks for the response, it?s encouraging to hear you think the longitudinal pipeline will still provide benefits, even in the absence of a non-linear template!

However out of interest: I was able to generate a non-linear unbiased session template without moving tissue from outside into the resection area. If I?d want to use this template for the analysis, is there any modifications I?d have to make to the existing workflow except for 1) using the non-linear template as norm_template.mgz and 2) running all commands that make use of the session_to_template.lta transforms with the appropriate non-linear warps?

Thanks for your help, its greatly appreciated !

Best,
Philip


> On 27.02.2024, at 08:42, Hoffmann, Malte,PhD <MHOFFMANN@mgh.harvard.edu> wrote:
>
> Hi Philip,
>
> The deformable template was most beneficial when differences between time points (TPs) were largest. While this is perhaps not surprising, it meant that the long registration time of 8h/TP in the abstract was not time well spent since we were already certain of group differences.
>
> We generally recommend the longitudinal stream for longitudinal data since much information is shared between the TPs. The median rigid template is typically a robust starting point for the processing of the individual TPs, sometimes even for developmental studies where you see the size of the brain increase.
>
> In your specific case, non-linear registration (using an image-intensity objective like in the abstract) might be detrimental. The algorithm will likely move tissue from outside the resected area into this area since the scan before resection will have matching intensities there, but this won?t necessarily make for a good template.
>
> Malte
>
> ________________________________________
> From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Philip P <philip.pruckner@gmail.com>
> Sent: Sunday, February 4, 2024 01:48
> To: freesurfer@nmr.mgh.harvard.edu
> Subject: [Freesurfer] Longitudinal Freesurfer in the presence of large  tissue defects
>
>        External Email - Use Caution
>
> Dear Freesurfer Developers,
>
> I am currently running the Longitudinal Pipeline on a cohort with significant portions of brain tissue removed. The obtained base templates overall look reasonable, however, when overlaying the transformed session T1ws and flicking between them, there still are noticeable residual differences. This is not surprising, given the inevitable brain shift after tissue removal, which rigid registration cannot account for. In my search for a non-linear base template option I came across the "Longitudinal FreeSurfer with non-linear subject-specific template improves sensitivity to cortical thinning? ISMRM abstract (MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/17N_xqg9IuaXhy0eeSRmExNHOVIHuG1VhD7ehDfM9lhAHQx1DjHxZBZOkIMpkZZmaQvKpod_U13FTUEv4Mjlf_zxtBMz1pQDVTSG1Ftye1JN4xO5M5SG4U9BUMa6MFgUFqBl5WtH2iRGieDTWRqoo8pvi4rCDtBE39N59hFeqN8U5vIB60L2hdNZJDtYXE52DhMQ0DXrzAslz3D1MWe2BGQ_pFz6OGMDL62b5vwC629XpD8V8-BX-ErWqw9btxdnEjeX
 az1ok0rmjvz_gpZ-RZtp6dXP-PN-niavD-_2ptdlhNpMhri8khgegNPA8q9FJBtKH9dC14pJoywm04FJvMQ/https%3A%2F%2Farchive.ismrm.org%2F2020%2F1050.html<https://secure-web.cisco.com/1me4RY0enlek75e3PAqIseSGOO7tfF84eBwPlWXYndHKO5G2tJADVy-TNvBizJR-LC2_sMvVChG7l5Pa8fM2tIAiP3DQT-SSQTQqRMUoLjOtjqu6MziPDQmMNRY5acq-T2Ufgp-DfTUhXPmCjLOm0i9Su5AxbRJ9lgN0NROMe0D3NZQJ0s72k_2YyzwWh9hncuI8MPyo0OJm0D5IdIvd_8-X2QAvcS54AE_ctHqeQi5RdtlySv2EfrrbKcuNkH5npl63jHoUptIM9QgGYk0XMO4RsHZYRXlfQW1IXJ1n62rfuX8xXiSbcBFppSYPx0utW1SkV7zhUcfnHb0qhtJwUFw/https%3A%2F%2Farchive.ismrm.org%2F2020%2F1050.html>) as well as related code on Github (MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/1kHilcnCgkwQrldX6iuJ88RE0UoXG5EVoDzuvrFNtUvMJmI9NVVlU6hLHzV_16j7zCxcIDLMuv0QWeoIUrIxm-VtU7KHbMv7W5aY14QjqJxZnIy61sXLVxGMS9GwOY_P3gKjaPcVtShNSu944zWe8iRW5SqV6JQSeH0YxD8k4cElitgB30TuChwpCxpOZ7LUEvF-eEIsdaBtKcwxqt_LJ6MMWVcWrgi26xNlZvTsutJN2trCkbxFFUlWcw3nXbb6HggJx8gWErRDsEpYDA3cNU1
 OVgY2z1JTDsjOdzUPetcyO-CxasSZ0zIuz5mcBWsGny_!
 ziEMeOR
AnZeds3EIeBhQ/https%3A%2F%2Fgithub.com%2Fmu40%2Ffreesurfer%2Ftree%2Fnf-long-nonlin<https://secure-web.cisco.com/10WRpCPnvc4D9H2TOaZHsTUn0u7cWtVKoReU9EtexFnzvs4ApXqcGX5LXIAqA1gw_jDyZM0n74IRnrQrlh-uC5HiUAB3QqdEQ4zL9c8zhF_OLGSzGLytRBv-qE6DlzxoJtfknjZSMHEk9AVKlDkNKUwBjYFIOBfFv0DA9Yeb5gqDUcqqZAprEL025Pp2xpCpTM3ZS5Qm_zuM2FG1j0boLUTmrLOeHCk3ls6LB6hI03mwTM2feKe8q6B2xiqJvcLmC8dKpj0jL8EEzZNi8PpkbFflk3RYfghezpSY7yOXY-dgVEzNbcZOVNd4lNmn-aZBLK1zqNqtODLsPG0JOP_Q3wA/https%3A%2F%2Fgithub.com%2Fmu40%2Ffreesurfer%2Ftree%2Fnf-long-nonlin>).
>
> I was wondering whether you could provide insights into what you think the best strategy for obtaining reliable longitudinal cortical thickness measurements in such a dataset. Do you have a feel for whether the Longitudinal Freesurfer processing stream still provides benefits over Cross-Sectional analysis in the presence of large defects? Would you recommend giving the above-mentioned non-linear implementation a shot or were there other reasons the feature has not been implemented yet in the official version?
>
> Thanks already in advance!
>
> Best
>
> Philip
> 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://secure-web.cisco.com/1rl2yFKAdl2Y2_4nr-RVTrY1c4EFuD0xPFxP3boCfk5ckrz4Wqon96BXir1VgKFXAkhJ9SQfeUf-ltuBeE6NhEzFCnsPIRKYZeRLaXsk58nLN1VMZ9mKUQQ5vKPKyo5Rn5UogTC60qloAHgbgTriDHQoCGMcyT2RMSSMy8heYVUy13leFd-42cVwJsKtZVWJN-OUl-J1QdbGwNd0KkOiAT1MxqBiWAAOGBvMeSn2MQ5SV8BC6Cu9BkCDwlYn-6VItrVXIljiwRsbQ83X6s0hZkOb82gtn1vgx_9w1LEM_bOwXwO8dqI5Ze6ztZQShcrmZY3CY8K99haq22-tIO6sRtA/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline <https://secure-web.cisco.com/1rl2yFKAdl2Y2_4nr-RVTrY1c4EFuD0xPFxP3boCfk5ckrz4Wqon96BXir1VgKFXAkhJ9SQfeUf-ltuBeE6NhEzFCnsPIRKYZeRLaXsk58nLN1VMZ9mKUQQ5vKPKyo5Rn5UogTC60qloAHgbgTriDHQoCGMcyT2RMSSMy8heYVUy13leFd-42cVwJsKtZVWJN-OUl-J1QdbGwNd0KkOiAT1MxqBiWAAOGBvMeSn2MQ5SV8BC6Cu9BkCDwlYn-6VItrVXIljiwRsbQ83X6s0hZkOb82gtn1
 vgx_9w1LEM_bOwXwO8dqI5Ze6ztZQShcrmZY3CY8K99haq22-tIO6sRtA/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> .
>




------------------------------

Message: 3
Date: Thu, 29 Feb 2024 02:42:57 +0100
From: fsbuild <fsbuild@contbay.com>
Subject: [Freesurfer] mri_synthseg fails with current model files (was
        Re: Support Request NextBrain)
To: freesurfer@nmr.mgh.harvard.edu
Cc: hfriedrich@bwh.harvard.edu, asorby-adams@mgh.harvard.edu
Message-ID: <eef92ce6f3756c08e884601a5871ee61@trashmail.com>
Content-Type: text/plain; charset="utf-8"

        External Email - Use Caution       

I don?t believe the workaround will be supported or provided with future releases intended to run on Silicon Macs. &nbsp;If there is still an issue with mri_synthseg running with the current model files in the freesurfer dev build, then please let us know the details.
- R.

On Feb 28, 2024, at 20:11, Sorby-Adams, Annabel &lt;ASORBY-ADAMS@mgh.harvard.edu&gt; wrote:Hi Helen,I managed to run mri_synthseg on my M2 Mac by coping over the model file to the 7.3.2 version of freesurfer, and installing the tensorflow workaround previously posted on the forum for apple silicon machines.I have not been able to get it to work on the 7.4 or most recent dev versions unfortunately. The work around for 7.3.2 isn?t ideal, but does the trick.&nbsp;Freesurfer gurus may have more insight though!&nbsp;AnnabelOn 28 Feb 2024, at 20:03, Friedrich, Helen &lt;hfriedrich@bwh.harvard.edu&gt; wrote:Hi R,Thanks for your quick response.&nbsp;We actually did that initially and it did not work unfortunately.Could you provide me with segmentations for a certain scan? Or do you see any other possibility to make it work?&nbsp;Best,Helen______________________&nbsp;Helen Friedrich, B.Sc.Doctoral Student&nbsp;Netstim Laboratory&nbsp;Center for Brain Circuit TherapeuticsDepartment of Neurolog
 y&nbsp;Harvard Medical SchoolBrigham and Women?s Hospital&nbsp;75 Francis St, Boston MA 02115&nbsp;brighamandwomens.org&nbsp;&nbsp;&nbsp;&lt;Outlook-rrf3zs4o.png&gt;&nbsp;Von:&nbsp;fsbuild &lt;fsbuild@contbay.com&gt;Gesendet:&nbsp;Mittwoch, 28. Februar 2024 17:20An:&nbsp;freesurfer@nmr.mgh.harvard.edu &lt;freesurfer@nmr.mgh.harvard.edu&gt;Cc:&nbsp;Friedrich, Helen &lt;hfriedrich@bwh.harvard.edu&gt;Betreff:&nbsp;Re: [Freesurfer] Support Request NextBrain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The mri_synthseg script and python in the freesurfer disrtibution you are running are not entirely compatible with the arm64 M1, M2, M3 processors in silicon Macs. &nbsp; You could try installing and running the development build of Freesurfer for the silicon Mac via the link below. &nbsp;(After download, right click on the .pkg installer, and select open with default, then follow the prompts).https:/
 /secure-web.cisco.com/1lFsgk7vtXlatyZGhw2wfT!
 f_WTyioo
4BmLzbKYJKS0chTLAdh3oNub0eu9G9qOzY1R1TPfh7O0cjIMQFuYhTlqUAiRdSgB91d0F3QHYByNFAVNjpsEEv4j8KUjqvzZLZqXEgP3pCVveZdU3qRAuGidK7qzpvBYz_YCjvjuBw1oBU1uPE747lnnMIYvx8VMwRVlcOMe3jWSxtNYLK8z_NDUA_K1a4C_SuFXhsDf1Div6UKtS7i7jpzOLjru_-tpPY3gKSfhG_l5s6JEbjagAkRoXdEm1sYZTLvjnL5yV99Wpxmx2NKrzlsvr_ucGSkEhwaNz9EMh0iPkmf8X102ExqfA/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Fpub%2Fdist%2Ffreesurfer%2Fdev%2Ffreesurfer-macOS-darwin_arm64-dev.pkgWe would be interested to know if you run into such issues with the above development build. &nbsp;Please keep in mind a development build can be unstable and has not been tested like an actual release. &nbsp;Your numerical result may differ with the development build compared to the previous build/release.- R.On Feb 28, 2024, at 14:25, Friedrich, Helen &lt;hfriedrich@bwh.harvard.edu&gt; wrote:Dear Support Team,I'm reaching out for assistance with setting up NextBrain - mri_synthseg.&nbsp;Unfortunately, I could not make it work. There seems to be an issue with the n
 p.float128-section. This error keeps showing up:&nbsp;&lt;image.png&gt;I have also tried to delete np.float128 from the script (as per suggestion from my colleague). However, the same error showed up.&nbsp;I'm working on a macOS M1.&nbsp;I would be very grateful for your assistance.&nbsp;Best,&nbsp;Helen&nbsp;______________________&nbsp;Helen Friedrich, B.Sc.Doctoral Student&nbsp;Netstim Laboratory&nbsp;Center for Brain Circuit TherapeuticsDepartment of Neurology&nbsp;Harvard Medical SchoolBrigham and Women?s Hospital&nbsp;75 Francis St, Boston MA 02115&nbsp;MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be&nbsp;brighamandwomens.org&nbsp;&nbsp;&nbsp;&lt;Outlook-jaw0jfh4.png&gt;&nbsp;_______________________________________________Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduMailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be&nbsp;https://secure-web.cisco.com/1rwDcenDHH042rGVnR9ADpR-TvoThnsOLxq
 L-WqiCsQXlodLvLH8LTsAf1UlTVWuEp53n7GP9_RUeZ2!
 zg9Z2Oji
IkAzj4i1I3r7BWZ9yej6K3qLG_Fsr4ngpe8HgSP3aG_ovKSBkDEN-4oG3T8odCmFHoLy5fQaV_FCeJ1Oms-2XscpGn-wph0VpO91I61dgtvQpUHXYPSYkE8xxZo25dN1JzjOsLlaCpcbhu0KQgwjSBkZ18Pd6mrnXirX80G6Q6O9hG_MHBJ2n3e0ZiAezwii6YRX9py4kmNFAm6usGa9jgoXWPQHlHQpqSSbkOh6zhMjDmNezK_QKtCp908UKk7g/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer_______________________________________________Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer&lt;Outlook-rrf3zs4o.png&gt;_______________________________________________Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr..mgh.harvard.edu/mailman/listinfo/freesurfer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/32015624/attachment-0001.html

------------------------------

Message: 4
Date: Thu, 29 Feb 2024 19:39:39 +0000
From: "Westin, Karin" <karin.westin@bih-charite.de>
Subject: Re: [Freesurfer] [ext] Re:  mris_convert reading surf.gii
        files?
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Message-ID: <4fff2d3b82c444eb8c5908c7f0c6d44f@bih-charite.de>
Content-Type: text/plain; charset="windows-1252"

        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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Westin, Karin
Sent: Saturday, February 24, 2024 6:10 PM
To: 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/e371ba97/attachment-0001.html

------------------------------

Message: 5
Date: Thu, 29 Feb 2024 21:05:36 +0000
From: "Huang, Yujing" <YHUANG43@mgh.harvard.edu>
Subject: Re: [Freesurfer] [ext] Re:  mris_convert reading surf.gii
        files?
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Message-ID:
        <MN2PR04MB5982A582BD85D2A47E1919849D5F2@MN2PR04MB5982.namprd04.prod.outlook.com>
       
Content-Type: text/plain; charset="us-ascii"

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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@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>
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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/3979b76b/attachment-0001.html

------------------------------

Message: 6
Date: Thu, 29 Feb 2024 21:09:28 +0000
From: "Westin, Karin" <karin.westin@bih-charite.de>
Subject: Re: [Freesurfer] [ext] Re:  mris_convert reading surf.gii
        files?
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Message-ID: <6f35187b487a4e6281d48270b9e69d9c@bih-charite.de>
Content-Type: text/plain; charset="windows-1252"

        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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@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>
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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/6540d461/attachment-0001.html

------------------------------

Message: 7
Date: Thu, 29 Feb 2024 21:25:02 +0000
From: "Huang, Yujing" <YHUANG43@mgh.harvard.edu>
Subject: Re: [Freesurfer] Creating a custom registration template with
        FreeSurfer template
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Message-ID:
        <MN2PR04MB598227571476A626E2B55F739D5F2@MN2PR04MB5982.namprd04.prod.outlook.com>
       
Content-Type: text/plain; charset="us-ascii"

It looks like if you don't specify a subject (--target subject) as common space, it will default to 'fsaverage'.  See https://surfer.nmr.mgh.harvard.edu/fswiki/mris_preproc

The input to -surfreg <> is the surface registration to the common space. I think it should be a surface file not in .mgh format.

Best,

Yujing

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Asuka Toyofuku
Sent: Wednesday, February 28, 2024 8:07 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Creating a custom registration template with FreeSurfer template


        External Email - Use Caution
Hi, thanks for your suggestion.

I added .mgh at the end of the input and output file, but I got a different type of error.

for d in Teen*
> do mris_preproc --surfreg sphere.reg.teenheart_average_template.mgh --s $d --hemi lh --out lh.surfreg.teenheart_average_template.thickness.mgh --meas thickness
> done
ERROR: cannot find fsaverage in /media/m-ssd5/FS7_Teen
ERROR: cannot find fsaverage in /media/m-ssd5/FS7_Teen
ERROR: cannot find fsaverage in /media/m-ssd5/FS7_Teen
...

Do we need the fsaverage folder when creating a custom template?
There is for example, lh.fsaverage.sphere.reg file in addition to sphere.reg.teenheart_average_template.

The previous error was ; ERORR: format for lh.surfreg.teenheart_average_template.thickness not recognized.
This time, the problem seems to lie in not having fsaverage folder, rather than the format for the thickness template?

Any input is appreciated.

Best,
Asuka
________________________________
From: freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Douglas N. Greve <dgreve@MGH.HARVARD.EDU<mailto:dgreve@MGH.HARVARD.EDU>>
Sent: 26 February 2024 18:22
To: freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu> <freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>>
Subject: Re: [Freesurfer] Creating a custom registration template with FreeSurfer template

You need to specify a format for the output (eg, ...thickness.mgz)
On 2/26/2024 10:31 AM, Asuka Toyofuku wrote:

        External Email - Use Caution
Hi, many thanks for your reply.
Here's the terminal output;

asuka@rigi:/media/.../FS7_Teen$<mailto:asuka@rigi:/media/.../FS7_Teen$> for d in Teen* EPK* epk*
> do mris_preproc --surfreg sphere.reg.teenheart_average_template --s $d --hemi lh --out lh.surfreg.teenheart_average_template.thickness --meas thickness
> done
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized
....
Error continued so I stopped running at a certain point.
What do you think?

Best regards,
Asuka
________________________________
From: freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu><mailto:freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Douglas N. Greve <dgreve@MGH.HARVARD.EDU><mailto:dgreve@MGH.HARVARD.EDU>
Sent: 23 February 2024 19:30
To: freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu> <freesurfer@nmr.mgh.harvard.edu><mailto:freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Creating a custom registration template with FreeSurfer template

Can you include the full terminal output for one of the mris_preproc commands that is failing?
On 2/22/2024 7:12 AM, Asuka Toyofuku wrote:
        External Email - Use Caution

Dear Freesurfer experts,



I have issues with creating a custom registration template. (I'm following this instruction: MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be<https://secure-web.cisco.com/1_qfYxT5WNAR-lGRNh895Kl4pqE513hIRdGqZt0w-oDRR8NwLSUh8ataurmByizdN5-6NPpWldetuOVhBt0OSuQVw_fTGTUnlfnRy5cZOC8gQ6xkn-I0sETntn5X7pssvIBMvxipctrdnnR0sdsJ_SEe-szwdE6WbG2z6qSW6mRoR1O_TSBtVJN6id4aZVTo30KwQes1T6AeGXG7volizYQI0te7HhF9DiqFp19oym11wqmrG8OvtY5FBou3V7ihQabCPQZdP81Qr6NFvLvkDT-D9iLBlRl7VIvT9MFviOs55EDcMS1LivQnETY_fTpuV_tnuLQHAkyphGLkrH_xwYA/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FSurfaceRegAndTemplates>MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be  https://surfer.nmr.mgh.harvard.edu/fswiki/SurfaceRegAndTemplates<https://secure-web.cisco.com/1_qfYxT5WNAR-lGRNh895Kl4pqE513hIRdGqZt0w-oDRR8NwLSUh8ataurmByizdN5-6NPpWldetuOVhBt0OSuQVw_fTGTUnlfnRy5cZOC8gQ6xkn-I0sETntn5X7pssvIBMvxipctrdnnR0sdsJ_SEe-szwdE6WbG2z6qSW6mRoR1O_
 TSBtVJN6id4aZVTo30KwQes1T6AeGXG7volizYQI0te7HhF9DiqFp19oym11wqmrG8OvtY5FBou3V7ihQabCPQZdP81Qr6NFvLvkDT-D9iLBlRl7VIvT9MFviOs55EDcMS1LivQnETY_fTpuV_tnuLQHAkyphGLkrH_xwYA/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FSurfaceRegAndTemplates> )



According to the instructions, we need to

1) Create an average subject (Creates $SUBJECTS_DIR/newtemplate)
2) Register each subject to the new template (do for both lh and rh), resulting in lh.sphere.reg.newtemplate and rh.sphere.reg.newtemplate
3) Get thickness values in the newtemplate space for GLM analysis
4) Create another average template based on the previous one: (Creates $SUBJECTS_DIR/newnewtemplate)

I'm stuck with the 3) command.
Instruction suggests:
mris_preproc --surfreg sphere.reg.newtemplate --s subj1 --s subj2 --s subj3 ...

and this is my code:
for d in Teen*
do mris_preproc --surfreg sphere.reg.teenheart_average_template --s $d --hemi lh --out lh.surfreg.teenheart_average_template.thickness --meas thickness
done


( I specified hemi and output because, without it, I got ERROR: no source hemi specified)

My command led to an error saying:
ERROR: format for lh.surfreg.teenheart_average_template.thickness not recognized

So my questions are:

a) what does it mean that "format for lh.surfreg.average_template.thickness not recognised"? Any ideas on how to fix this?

b) Does this mris_preproc --surfreg command produce different smoothing mgh files? (e.g., fwhm10, fwhm15, fwhm20...?)

Because standard mris_preproc before GLM analysis(MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be<https://secure-web.cisco.com/1lH2n5girv1pSO3WmL3I9nDeL07oFU0ViiAmz_tUClrPQjFwGxFIj8Uw-HpRNXN4_ADUrXeK8GQcI91O76PQUoilqcBBTuz_cbBfg2BUYMoPChwgcqvL5jiL3mJuCIhROFLqmz6Ay1m-Mt3VqQfQiArWs7KPRzGvA7altNpSDzxPE8sB-_TlC3JKVV06-mzVggUwD3kS7BkRaXe1z174NmNbHyzHlcoUEX12pXebgZgGEv6bLiKxH2Wrka404J_vPCmOb8me-0QbLp1HJJdw_vbklt9SSNhdXnR2XCQ-vZeRZep_w5lp7gvo-TBU4Fdow4MtnGe-Oy6yM7OBUf0230w/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis>MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be  https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis<https://secure-web.cisco.com/1lH2n5girv1pSO3WmL3I9nDeL07oFU0ViiAmz_tUClrPQjFwGxFIj8Uw-HpRNXN4_ADUrXeK8GQcI91O76PQUoilqcBBTuz_cbBfg2BUYMoPChwgcqvL5jiL3mJuCIhROFLqmz6Ay1m-Mt3VqQfQiArWs7KPRzGvA7altNpSDzxPE8sB-_TlC3JKVV06-mzVggUwD3kS7BkRaXe1z174N
 mNbHyzHlcoUEX12pXebgZgGEv6bLiKxH2Wrka404J_vPCmOb8me-0QbLp1HJJdw_vbklt9SSNhdXnR2XCQ-vZeRZep_w5lp7gvo-TBU4Fdow4MtnGe-Oy6yM7OBUf0230w/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FFsTutorial%2FGroupAnalysis>) are done with previously qcashed data (e.g., need thickness.fwhm10.fsaverage to run mris_preproc), but at this point, I don't have any of these thickness files with different smoothing levels.

c ) If this mris_preproc --surfreg command does not generate a set of thickness maps in **newtemplate space** at different smoothing levels, what kind of command should I run?



Any input is appreciated!



Best regards,

Asuka



_______________________________________________

Freesurfer mailing list

Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>

MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be MailScanner has detected a possible fraud attempt from "mail.nmr.mgh.harvard.edu" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/1P5xyvuWx-Tu2C8XoujU2_ysnnzL1uXfdUE9xDUQvzRppRSGbEa73rlOAbFOgevsjtXrflDxEcyFW64mO722UcsVln78lAOxD_lN1PhkKYj3uijWpn7-IrOX36M-wBhxMndu-p04SYqTviK2AKhGltULUoUnGtVPu_uKL5bh-HwaP-sH_mP4r5xncmihr0Vj9WceAE53kOKmAlWOY5iM8yH3UKzmdrHl12L3hzFDBV-qjiGBNesTM6lwJ8ioJ9-3RltgkcydvWQV1-elYOZHUPTzChKBwZ2KfpcjDXbyWkDOedrbEpuQzKtafDusTPtT2mVuR0q7Uc8RRvZnT1nu2Ug/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>




_______________________________________________

Freesurfer mailing list

Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>

MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be MailScanner has detected a possible fraud attempt from "mail.nmr.mgh.harvard.edu" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer<https://secure-web.cisco.com/1fCc_gQTFWHCdhjG7Hho5kcREMf5WOuX_ifypSOsOOemAWP48VPBG6pAJCp10hDtXWfBB7nr6lZEMkpVd0dxEupvKLVPktFO5EGGb7-BZM8zDZ4k1e_T_7XCVAwGzjA_3l3-7Jq5VFg-jT3WawVM4AFrhP85UsGW0GrPnZ-kRqgETNlrtpvVDiuaf0egkpJpEyL3nfN75fzOU6Tsb00P8oXSKlGEL57xvEX435-Tre9MhoX1YeCCYS1BqtnObvuyiPKQw-S5uss2BG-QOZsFtlJy_1y35ZKEc0WbZ24lGBmZo-i1_vYr8xWNCY1EA_PvCvBpYXqGF957jZXqGSb_DRg/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/370945b3/attachment-0001.html

------------------------------

Message: 8
Date: Thu, 29 Feb 2024 21:29:25 +0000
From: "Huang, Yujing" <YHUANG43@mgh.harvard.edu>
Subject: Re: [Freesurfer] [ext] Re:  mris_convert reading surf.gii
        files?
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Message-ID:
        <MN2PR04MB59826E46ACC35BB5BDDC4E809D5F2@MN2PR04MB5982.namprd04.prod.outlook.com>
       
Content-Type: text/plain; charset="us-ascii"

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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@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>
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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/358cc2d5/attachment-0001.html

------------------------------

Message: 9
Date: Thu, 29 Feb 2024 21:40:31 +0000
From: "Westin, Karin" <karin.westin@bih-charite.de>
Subject: Re: [Freesurfer] [ext] Re:  mris_convert reading surf.gii
        files?
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Message-ID: <39836679d5e948fb9c71390e8468e64c@bih-charite.de>
Content-Type: text/plain; charset="windows-1252"

        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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@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>
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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/1d7a2c8d/attachment-0001.html

------------------------------

Message: 10
Date: Thu, 29 Feb 2024 21:59:50 +0000
From: "Huang, Yujing" <YHUANG43@mgh.harvard.edu>
Subject: Re: [Freesurfer] [ext] Re:  mris_convert reading surf.gii
        files?
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Message-ID:
        <MN2PR04MB598288675FDE67E213B93F539D5F2@MN2PR04MB5982.namprd04.prod.outlook.com>
       
Content-Type: text/plain; charset="us-ascii"

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-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu>> on behalf of Huang, Yujing <YHUANG43@MGH.HARVARD.EDU<mailto:YHUANG43@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-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@nmr.mgh.harvard.edu> <freesurfer-bounces@nmr.mgh.harvard.edu<mailto:freesurfer-bounces@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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/freesurfer/attachments/20240229/dcf32624/attachment.html

------------------------------

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

End of Freesurfer Digest, Vol 240, Issue 19
*******************************************