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?
External Email - Use Caution
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 bertocerron@gmail.com wrote:
External Email - Use CautionHello 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?
External Email - Use Caution
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_QI...
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_6T2AndQf1rq6BsPpYglmbJ3GzN01rptI6VZge7q...
-Paul
freesurfer@nmr.mgh.harvard.edu