Re: [Freesurfer] Euler number calculation from number of holes

2024-02-01 Thread Huang, Yujing
Just checked mris_euler_number,  holes are calculated from euler number: holes 
= 1-eno/2


From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Fischl, Bruce R.,PHD
Sent: Thursday, February 1, 2024 10:27 AM
To: Freesurfer support list 
Subject: Re: [Freesurfer] Euler number calculation from number of holes

Hi Melissa

mris_euler_number 

writes out a bunch of stuff, including the Euler number:

mris_euler_number ~/links/subjects/bruce.dev/surf/lh.orig.nofix
euler # = v-e+f = 2g-2: 154526 - 463668 + 309112 = -30 --> 16 holes
  F =2V-4:  309112 != 309052-4 (-64)
  2E=3F:927336 = 927336 (0)

total defect index = 32

so -30 in this case. Is that what you wanted?

Cheers
Bruce
From: 
freesurfer-boun...@nmr.mgh.harvard.edu
 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of Melissa Thalhammer
Sent: Thursday, February 1, 2024 5:31 AM
To: Freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Euler number calculation from number of holes


External Email - Use Caution

Dear FreeSurfer experts,



I want to calculate Euler numbers for QC but I am not sure how to get them. I 
read some posts here and figured out that I get the number of holes in a 
surface with mris_euler_number -o $OUTPUT_FILE $subject/surf/?h.orig.nofix. Is 
it correct that I need to calculate the Euler number subsequently as the sum of 
holes of both surfaces and then Euler_number=(number_of_holes*(-2)) -2 ?



Best, Melissa



___
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 
 .
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. 


Re: [Freesurfer] Euler number calculation from number of holes

2024-02-01 Thread Fischl, Bruce R.,PHD
Hi Melissa

mris_euler_number 

writes out a bunch of stuff, including the Euler number:

mris_euler_number ~/links/subjects/bruce.dev/surf/lh.orig.nofix
euler # = v-e+f = 2g-2: 154526 - 463668 + 309112 = -30 --> 16 holes
  F =2V-4:  309112 != 309052-4 (-64)
  2E=3F:927336 = 927336 (0)

total defect index = 32

so -30 in this case. Is that what you wanted?

Cheers
Bruce
From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Melissa Thalhammer
Sent: Thursday, February 1, 2024 5:31 AM
To: Freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Euler number calculation from number of holes


External Email - Use Caution

Dear FreeSurfer experts,



I want to calculate Euler numbers for QC but I am not sure how to get them. I 
read some posts here and figured out that I get the number of holes in a 
surface with mris_euler_number -o $OUTPUT_FILE $subject/surf/?h.orig.nofix. Is 
it correct that I need to calculate the Euler number subsequently as the sum of 
holes of both surfaces and then Euler_number=(number_of_holes*(-2)) -2 ?



Best, Melissa



___
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 
 .
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. 


Re: [Freesurfer] mri_watershed and improvements of skullstripping

2024-02-01 Thread Michelangelo Fabbrizzi
External Email - Use Caution

Dear Lilla,

Thanks for your reply. Could you kindly point me to the skullstripping tool for 
pediatric data? Does it need InfantFS or works also with FS standard version?

Appreciated,

Mic

> Il giorno 11 gen 2024, alle ore 18:02, Zollei, Lilla,Ph.D. 
>  ha scritto:
> 
> HI Mic,
> For pediatric data (not sure what age range you are processing), we use a 
> different skullstripping tool. That might be useful for you. Let me know if 
> this is stil of interest to you.
> Best, Lilla
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
>  
>  > on behalf of Michelangelo 
> Fabbrizzi mailto:michef...@gmail.com>>
> Sent: Saturday, August 5, 2023 11:33 AM
> To: Freesurfer support list  >
> Subject: Re: [Freesurfer] mri_watershed and improvements of skullstripping
>  
> External Email - Use Caution
> Dear Experts,
> 
> I reran -autorecon1 with the -expert option adding in the file xopts.txt:
> mri_normalize -mprage -b 20 -n 5 -gentle \n mri_watershed -h 5 -atlas 
> -useSRAS -surf sub-01_recon
> 
> This improved a lot the surfaces, however the inner_skull and outer_skull 
> surfaces, are still crossing (I suspect this is due to the fact that I am 
> using pediatric data and the shift of the surfaces are too big maybe?).
> So I created a new inner_skull and outer_skull surfaces giving a shift of 
> +1mm and -2mm respectively using Freesurfer commands:
> mris_expand sub-01_recon_brain_surface 1 sub-01_recon_inner_skull_surface
> mris_expand sub-01_recon_outer_skin_surface -2 
> sub-01_recon_outer_skull_surface
> They are now much better, see attached screenshots (before shift correction 
> and after it).
> 
> 
> 
> 
> I would have two questions for you:
> 1- it looks the brainmask.mgz still contain three pieces of skull (see 
> screenshot below)…is there any other way to remove them (-less removes too 
> much)? better if from command line, otherwise even manual intervention
> 2- is it possible to force mri_watershed to use a smaller value of the shift 
> when it generates the inner_skull and outer_skull surfaces from the 
> brain_surfaces and outer_skin_surface (instead of using another command after 
> it as I did with mris_expand)?
> 
> I greatly appreciate your help and thank you in advance for it!
> 
> Miche
> 
> 
> 
> 
> 
> 
>> Il giorno 1 ago 2023, alle ore 00:22, Douglas N. Greve 
>> mailto:dgr...@mgh.harvard.edu>> ha scritto:
>> 
>> External Email - Use Caution
>> 
>> there are not options to autorecon1 specifically. You can pass some 
>> watershed args on the command line, but it is probably easier to use an 
>> expert options file, eg, create a text file (eg, xopts.txt) with something 
>> like
>> mri_watershed -less
>> then run recon-all with -expert xopts.txt (and the rest of your args)
>> You can add as many options as you want to that line
>> 
>> On 7/31/2023 1:22 PM, Michelangelo Fabbrizzi wrote:
>>> External Email - Use Caution
>>> Dear Yujing,
>>> 
>>> thanks again for your help, just a last question, how can give to 
>>> autorecon1 the input to use certain options at the mri_watershed step (for 
>>> instance a certain preflood height (-h 5) or use of the atlas option 
>>> (-atlas))?
>>> 
>>> recon-all -s sub-01_recon -i T1w.nii.gz -autorecon1 
>>> 
>>> Your help is greatly appreciated!
>>> 
>>> Michelangelo
>>> 
 Il giorno 31 lug 2023, alle ore 17:23, Huang, Yujing 
   ha scritto:
 
External Email - Use Caution
 
 I'm not sure how to force mri_watershed command to use the brainmask.mgz 
 already created.
 
 Recon-all '-gcut' is achieved by running mri_gcut after mri_watershed.
 
 -Original Message-
 From: freesurfer-boun...@nmr.mgh.harvard.edu 
  
  
  On Behalf Of Michelangelo 
 Fabbrizzi
 Sent: Sunday, July 30, 2023 9:32 AM
 To: freesurfer@nmr.mgh.harvard.edu 
 ; fsbuild  
 ; freesurfer-ow...@nmr.mgh.harvard.edu 
 
 Subject: [Freesurfer] mri_watershed and improvements of skullstripping
 
External Email - Use Caution
 
 Dear Freesurfer experts,
 
 I am new to FS, and I would have couple of questions.
 I used in sequence:
 A- recon-all -i sub-01_T1w.nii.gz -s sub-01_recon -autorecon1
 B- recon-all -skullstrip -wsthresh 5 -clean-bm -s sub-01_recon
 C- recon-all -skullstrip -clean-bm -gcut -subjid sub-01_recon
 
 The brainmask.mgz obtained is good (no skull, brain is okay), however if I 
 now use mri_watershed to obtain the bem surfaces, it looks the 
 

Re: [Freesurfer] longitudinal hippocampal segmentation error in Mac OS Sonoma + Freesurfer 7.2.0

2024-02-01 Thread João Ramos
External Email - Use Caution

(not familiar yet how to reply on this platform, possible duplicate message, 
apologies)

Thank you for your reply.

I have since downloaded and installed 7.4.1 w/ matlab R2019b, and the original 
issue disappeared.

I then faced problem 1) 
"/Applications/freesurfer/7.4.1//bin/run_SegmentSubfieldsT1Longitudinal.sh: 
line 33: 
/Applications/freesurfer/7.4.1//bin/SegmentSubfieldsT1Longitudinal.app/Contents/MacOS/SegmentSubfieldsT1Longitudinal:
 No such file or directory”.

My solution (temporary, just to check if it ran into further issues) was to 
copy over this specific file/app from the 7.2.0 installation over to the 7.4.1 
folder structure. Code went through and it ran for about 10 minutes nicely. I 
was then faced with problem which ends as 2)
"
minLogLikelihoodTimesPrior =

   1.6947e+06

Resolution level 1 iteration 3 deformation iterations 6
/Applications/freesurfer/7.4.1//bin/run_SegmentSubfieldsT1Longitudinal.sh: line 
37: 14257 Abort trap: 6           
"${exe_dir}"/SegmentSubfieldsT1Longitudinal.app/Contents/MacOS/SegmentSubfieldsT1Longitudinal
 $args
Darwin Joaos-MacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 
21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64 x86_64"

I imagine error 2 is related to not properly addressing problem 1. Any ideas 
how to fix this? This never happened with other freesurfer installations (both 
v6.0 and v7.2.0 that I also have installed and both have this file/app for 
longitudinal processing) and the error output is not very informative to fix 
it. File /run_SegmentSubfieldsT1Longitudinal.sh exists and looks identical to 
that of 7.2.0.

Best,

--
João Ramos
On 30 Jan 2024 at 04:12 +, fsbuild , wrote:
>
> At this point, I think your best bet is to install and run the freesurfer 
> 7.4.1 release from June 2023 which was tested with R2019b.   Although The 
> MathWorks does not support R2019b on MacOS Sonoma, I think we tested the 
> 7.4.1 release on BigSur, Monterey and Ventura.  So it may work on Sonoma.  
> The 7.2.0 release from 2021 is too old to have been tested on newer versions 
> of MacOS.
>
> You can install the 7.4.1 release with the pkg installer,
> > https://secure-web.cisco.com/15uvAgvDthWGdOGyACM8IRTLNAxSG0yJP-WNrgKEPEI81Dxtj5PSEvEMgO27XZ5BDX_mqAgLKC6d8eVJdp_FJfLOV6gdu0IIjSKvUoJGPAed_WWIB2zaO3nWxmVICKP-vCxi7dJkK6LFL4alfmo9XS5JB5Q3tyDCWaeeI8T9WWBtwYOP0ah1MWO55ApP-IBH4he1CEpoPlQXi5vdOJGihMWvLxzmQcLsyguBd9v_t-N73CAndhTUWDGdi_49-EabIw9C8-7TnWU2nbSFXCcb7tcnRev8Ihoe7t32pA84rR59bk7D_tdHTTzByDfjMtjSH5EEUqGkoO3eCRFJ0eZ7BGQ/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Fpub%2Fdist%2Ffreesurfer%2F7.4.1%2Ffreesurfer-macOS-darwin_x86_64-7.4.1.pkg
>
> After installing 7.4.1, you should run the fs_install_mcr_script provided in 
> the freesurfer distribution to install and setup R2019b using the 
> instructions below.
>
> - R.
>
>
> $ export FREESURFER_HOME=/Applications/freesurfer/7.4.1
>
> $ cd $FREESURFER_HOME/bin
>
> $ sudo FREESURFER_HOME=$FREESURFER_HOME  ./fs_install_mcr  R2019b
>
> … answer y to any installer questions ...
>
> The script should output how to set the environment variable LD_LIBRARY_PATH 
> to pick up the The MathWorks libraries.  That might include a setting 
> something like,
> $ export LD_LIBRARY_PATH=$FREESURFER_HOME/MCRv97/bin/glnxa64:$LD_LIBRARY_PATH
>
> Please make sure you have otherwise removed any references to your previous 
> matlab R2016 environment from PATH, LD_LIBRARY_PATH, etc.
>
>
> > On Jan 29, 2024, at 21:02, Iglesias Gonzalez, Juan E. 
> >  wrote:
> >
> > Dear Joao,
> > I’ll defer to our software specialists, but another option may be trying 
> > the Python version:
> > https://secure-web.cisco.com/14G8h6OezbBpedq9hfk_TpIRQ2ASJXOicqLloqWz5RcV2NzGrxoqRVpjxSNR3H7TebrPoiVJu2-GDCYCxzrX6yqKljn4EJZjWJ_fyI63cq3woB5Fg04L8jYbRmtIKhtmMtHvi0hO5_NwSmaRR7CczxIkZFgOTKT_zkadzZVpU73BW-dStf-j8p1ToDsvC_ML9qpzFgp8I0I_faGs-E7JKzICkrBZeolCB3gFo9qPSRctD12HozdKUckB5rVsJxz4KQ72brcyKDO4y8WxJX4Oe_2gKZerwNB9V9RyUWtFmea1DC3A98EL3xE-r0z3PZme5z6aTDV9XVpRA0yB7frEZwA/https%3A%2F%2Fsurfer.nmr.mgh.harvard.edu%2Ffswiki%2FSubregionSegmentation
> > Cheers,
> > /E
> >
> >
> > --
> > Juan Eugenio Iglesias
> > http://secure-web.cisco.com/1pxIahS4t5IaRxvhOa8ZZ85dRNIoWSkmqhyab4-3o6se_dDdZOLvAzSUv9DAxjiNKNOV0vye0YgEOTtrxwn2vO7iAv5Zb_1zqWpjcpXCyN59ylizQZdJ-I4kBFnj_kniRFUrtVSlvICtbpNbDGMBCP9FbO5bAz19SrS7oG1wRHxW8O1MWPeY8uUyyn-r0uEROSLI-jy7LHuRadVUEBlHRAUZCg70GWTGyslCLRYVg-gpqwAOjrvDIrRewRGwJBKURIHfgP9boOmwi7P3tNxAveARdMMQ2WCmzBx5xDYOVWgUTJRJ060Oj_lqTtJWButmSF6gQBcPfFiAT5ltRfW_42A/http%3A%2F%2Fwww.jeiglesias.com
> >
> > From: freesurfer-boun...@nmr.mgh.harvard.edu 
> >  on behalf of João Ramos 
> > 
> > Date: Monday, January 29, 2024 at 4:26 PM
> > To: Freesurfer@nmr.mgh.harvard.edu 
> > Subject: [Freesurfer] longitudinal hippocampal segmentation error in Mac OS 
> > Sonoma + Freesurfer 7.2.0
> > External Email - Use Caution
> > Dear all,
> >
> > I would appreciate your help in an issue I am 

[Freesurfer] Freesurfer white matter overestimated

2024-02-01 Thread Luisa Klahn
External Email - Use Caution

Hello!
I am processing structural data from a 3T scanner using Freesurfer version 
7.3.2. For some subjects, the grey matter looks very thin, and the white matter 
looks overestimated. I'll attach screenshots of the brainmask, wm mask, and T1 
including wm and pial surface lines.
I have tried to set control points into the wm but this did not change the 
results.

Does anyone have an idea? Would it be possible to change the intensity settings 
in the recon-all command?

Thanks for helping!
Luisa
___
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 
 .
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. 


[Freesurfer] Euler number calculation from number of holes

2024-02-01 Thread Melissa Thalhammer
External Email - Use Caution

Dear FreeSurfer experts,


I want to calculate Euler numbers for QC but I am not sure how to get them. I 
read some posts here and figured out that I get the number of holes in a 
surface with mris_euler_number -o $OUTPUT_FILE $subject/surf/?h.orig.nofix. Is 
it correct that I need to calculate the Euler number subsequently as the sum of 
holes of both surfaces and then Euler_number=(number_of_holes*(-2)) -2 ?


Best, Melissa


___
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 
 .
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. 


[Freesurfer] Query Regarding White Matter Hypointensity Volume Calculation

2024-02-01 Thread Liang Zhao
External Email - Use Caution

Dear FreeSurfer Team,

I hope this email finds you well. I am reaching out to seek
clarification regarding the WMH-SynthSeg function in FreeSurfer.

I am interested in utilizing the WMH-SynthSeg function for the
computation of white matter hypointensity. However, I am uncertain
whether the resulting volume values undergo any form of normalization,
such as division by intracranial volume, etc. Currently, I lack
information on whether the obtained values are comparable across
different subjects. Could you please provide insights or guidance on
how the volume values are processed or standardized in WMH-SynthSeg?
Understanding this aspect is crucial for ensuring the comparability of
results across diverse study participants.

I appreciate your dedication to the development of FreeSurfer and look
forward to your valuable insights.

Best regards,
Liang Zhao
Nanjing Medical University

___
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 
 .
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.