External Email - Use Caution        

Hi all,


Just few clarifications:


1) Lesions are segmented in SAMSEG with the label 99.

2) @Paul: The script Koen was talking about is not yet in the repo (hopefully 
we will commit it soon)


@Alberto: if you are just interested in *only* the volume of vascular lesions 
for different thresholds you can also run SAMSEG with the --save-posteriors 
flag to obtain 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 re-running anything.


Hope it helps.


Best,

Stefano


Hi Alberto, Koen and Stefano,

You can get the behavior you want/expect by counting the number of voxels
> assigned to lesions in the seg.mgz file - there is a ready tool for that in
> FreeSurfer but I don't remember off the top of my head what the correct
> command is (a search on the mailing list should be able to reveal it)
>

You should be able to do this with mri_segstats, e.g.
```
mri_segstats --seg /path/to/seg.mgz --o test.txt
```

You'll also need to know the label number in the FreeSurfer lookup table
> for lesions - perhaps Stefano can tell you what it is (?)


The label for lesions should be specified in
`$FREESURFER_HOME/FreeSurferColorLUT.txt`, right now there seems to be 2
entries:
```
# wm lesions
498 wmsa                                    143 188 143 0
499 other_wmsa                              255 248 220 0
```

A few months ago Stefano Cerri wrote some code to correct this behavior
> (and apply different thresholds without having to re-run everything from
> scratch), but it never made it into the repository (my fault).


Koen/Stefano, just to double-check my understanding, and you referring to
this script that Stefano wrote?
-
https://secure-web.cisco.com/12C09A1Pra-JQ3_eWwPneWHlTs8QZ2h-wDRi-AlByffQ_QIWIu17tflIF58pjQ9HLOtYBcmztu3euel_eLN7G38YXnAiDKnrzjd9K1QkAIh__uGT3yzeUplTZQgapM7wy_YWlhiWM1RXYX2WaRXDo1zP1ebLFpkCRmHKg11fXHSnWHutLwcl_ZnMKb4uZdQOe860OOFv_t1YAMwYZHLoHErw4f8FUZ0JvyxrNHd5msiz_sja5bAEgN7-3ZqR957S1Ad-OOZunTyOSFWOzdwljxQ/https%3A%2F%2Fgithub.com%2Ffreesurfer%2Ffreesurfer%2Fblob%2Fdev%2Fsamseg%2Fgems_compute_binary_atlas_probs

My understanding is that this could be used to update the priors of the
model without having to re-run everthing.  Not sure if what is being
discussed here is related or something completely different.  I've been
working on generalizing that script to n-classes here:
-
https://secure-web.cisco.com/1VNfWVD_6T2AndQf1rq6BsPpYglmbJ3GzN01rptI6VZge7qfAmTxcMGIRwfyS5UFa94DGFk9puvQZ-aB22F7cAqEIaEAViRRfPmOh7v6j4oW0TT6wL4ZK9XyceRl2GA6yAbXcimGQj4dNZDAz6ACpxkTlMDbPOH3hmKvLE09mHQVuXanZu-iYF5s3VdKf8padIKNW2YCaC3Nmslowctma-X6lcGzwXCR4L3TiG_jou_E-tE_DVRuWrqWCtp7Z7aLTIxpQ-9P2iEKFt9C3XQsoAw/https%3A%2F%2Fgithub.com%2Fpwighton%2Ffreesurfer%2Fblob%2F20210513-fs-infant-dev-merge%2Fsamseg%2Frecompute_atlas_probs

-Paul




_______________________________________________
Freesurfer mailing list
[email protected]
https://secure-web.cisco.com/1JpWiCtEjoGvM3-M_AnpjGHywxhvQwt3I6V2dThQ0HgMB80JOofI31rSPwAgvaNmmjiLWxEQan12Dkts5QwGD4Va3vHoFj_FWi9oaeKIGGcS6_To6kjiEk98QOo5DCKEdX5m2hQ5X6-Gcg8HhfdF30WzeActvMiS0BQVxyeyLsELU2oeYYioe2GnCkhTLyGKcHqUx89BLIF_NyHChrmpYi88GcDdsPL5s5KGK197mQT_K2yVNUOSg02eyZW2GEj4xj602koSo1M8hq_hQivd-zQ/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Ffreesurfer


Hi Alberto,

In the current implementation the volume reported in the table is simply the 
sum of the lesion posterior probabilities, i.e., it is not affected by the 
threshold used to create the crisp segmentation result for the lesions. A few 
months ago Stefano Cerri wrote some code to correct this behavior (and apply 
different thresholds without having to re-run everything from scratch), but it 
never made it into the repository (my fault).

You can get the behavior you want/expect by counting the number of voxels 
assigned to lesions in the seg.mgz file - there is a ready tool for that in 
FreeSurfer but I don't remember off the top of my head what the correct command 
is (a search on the mailing list should be able to reveal it)

You'll also need to know the label number in the FreeSurfer lookup table for 
lesions - perhaps Stefano can tell you what it is (?)

Koen


On Thursday, July 1, 2021, Alberto Del Cerro Leon 
<[email protected]<mailto:[email protected]>> wrote:

        External Email - Use Caution

Hello FreeSurfer team, I have a question about SAMSEG thresholds. I am 
analyzing the vascular lessions aplying several thresholds. I would expect that 
lower thresholds results in lower volumes but dont seems like that. What is the 
reason?

_______________________________________________
Freesurfer mailing list
[email protected]
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to