External Email - Use Caution
Dear Koen,
Thank you for your reply and wish you the best of luck on your grant application.
As some of the lesion masks are found to be weird, which shows false positive lesions on the brain, I increased the threshold to lower false positive results. The number of lesion volume and the lesion mask did not show the difference between two different thresholded images, though. Is it normal to have lesion volume the same even with a different threshold?
I look forward to hearing from you. Thank you so much for your time and patience.
Best regards,
Krystal
________________________________ From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Koen Van Leemput leempko@gmail.com Sent: 17 January 2024 16:56:34 To: Freesurfer support list Subject: Re: [Freesurfer] [FreeSurfer] Lesion detection at different thresholds
External Email - Use Caution
Hi Krystal,
Apologies for the delay in replying (grant deadline).
The lesion class in samseg is a bit special, as the internal lesion probabilities are thresholded (using the value passed on via the --threshold flag, or a default value 0.3 if you don't use that flag) to obtain the voxels labeled as 99 in the segmentation output. In contrast, the value in the .stats file is simply the sum (over all voxels) of those internal lesion probabilities.
If you want to inspect the impact of the exact threshold value on the number of voxels with label 99, you could run (as you did) samseg with the --save-posteriors flag to save the internal lesion probabilities (in yourSeg/posteriors/Lesions.mgz). Then you can play with mri_binarize and mri_segstats to obtain lesion volumes for different thresholds without having to re-run sameg anew.
Hope this helps,
Koen
On Sun, Jan 7, 2024 at 11:05 PM Krystal Xiwing Yau <krystaly@hku.hkmailto:krystaly@hku.hk> wrote:
External Email - Use Caution
Dear FS experts,
I am testing out which threshold works the best for the image. As I tested 0.3 and 0.9, the lesion masks do show the difference but the measurement is the same. Please see below for your information:
[cid:ii_18d169fa598f456b1e51]
Fig 1. Lesion.mgz with a threshold of 0.3 applied to FLAIR image
[cid:ii_18d169fa59af456b1e52]
Fig 2. Lesions.mgz with a threshold of 0.7 applied to FLAIR image
Do the volume of lesions supposedly different with threshold adjustments?
The following code is what I used for running samseg:
run_samseg --input $FREESURFER_HOME/${i}.nii $FREESURFER_HOME/${i}_flair_reg.nii --pallidum-separate --lesion --lesion-mask-pattern 0 1 --threshold 0.7 --output $SUBJECTS_DIR/${i}_samsegOutput_thold0.7/ --save-posteriors --threads 8
Thank you for your attention.
Regards, Krystal
Tel.: +852 2255 5024 Fax: +852 2872 5828 Address: Room 304, 3/F, New Clinical Building, 102 Pokfulam Road, Hong Kong. _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edumailto:Freesurfer@nmr.mgh.harvard.edu MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://secure-web.cisco.com/1Lym_B8akFFCF3fbNy7aTXko_DzCAp1ZP_F92UvpoNnqF9_...https://secure-web.cisco.com/1SQ0_HocLG1cW0ICC6TL2w0TL2FFAKsKAamGEcm4wR86sQfp5_ugmBUW4fkaDUws0L9UHGmUEhef_ZZcxvw-nHVPCjX1HWUVu0jWW9czm6Ersv6PPF8myLxBglhGZZhbBDYaM2Ko6W5MRmQ0Oye4E6Ls4xH0KUFtlTCR4-hjZiBJnQXK0nMbbvZeHRezRBSvtjMqW1n96FplZLs2jv2vlkZgOyU4Jwoi8UeYGv5aZh9aVD4V2UF2_4RSxj0yVhKNpTn6_BrH2EDJG5zxvJlRgVW7teXeMbghE2nRSzuCo01CgpUlzEK8mKVI1MgEpzkPISoZGIEwqWU0_LAekOABZgA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer