External Email - Use Caution
Hi Stefano,
Thank you for your reply and explanation.
The command I'm using to segment FLAIR is as follows:
run_samseg --input T2_FLAIR.nii.gz --output samseg_outputs --threads 8 --lesion --lesion-mask-pattern 1 --threshold 0.3 --save-posteriors --save-probabilities
In some cases we're also including T1 gadolinium scans together with the FLAIR (co-registered) and use the following:
run_samseg --input T2_FLAIR.nii.gz T1_gad.nii.gz --output samseg_outputs --threads 8 --lesion --lesion-mask-pattern 1 1 --threshold 0.3 --save-posteriors --save-probabilities
Thanks again for your help, Evie
On Wed, Mar 29, 2023 at 2:08 PM Cerri, Stefano,PHD SCERRI@mgh.harvard.edu wrote:
Hi Evie,
--save-probabilities and --save-posteriors will save two different things for lesions. The former is an initialization of lesions based on intensity and location constraints, and the latter is a probability map of seg.mgz after we also introduce lesion shape constraints (Cf Fig.4 of https://secure-web.cisco.com/1VpwnPCBwX-eDXesGDw_-WkfUFOEAHrTmOSJbFIKn414Ahq...).
The output of --save-probabilities should give you a very noisy lesion probability map with lots of false positives (at least this is my experience). In your case, it seems that too many *true* lesions are removed when the shape model is introduced. Would you be able to provide the command you're using to segment your T2-FLAIR scans? Which --lesion-mask-pattern values are you using for this input combination?
Stefano
Evie Neylon Tue, 28 Mar 2023 07:15:17 -0700
External Email - Use CautionDear experts,
I am running SAMSEG to segment MS lesions from T2 FLAIR scans. I wanted to create a lesion mask in order to obtain lesion volumes and lesion counts, so I used mri_binarize on seg.mgz to obtain all voxels with the value 99. However, upon visualising this mask I see that there are holes in the mask in regions that are quite clearly lesions based on the FLAIR image. I see in seg.mgz that these voxels are instead assigned incorrectly to a different tissue, as the lateral ventricle, for example.
I wondered if this misassignation of tissue was due to the chosen threshold (0.3) so I added the --save-probabilties flag to look at the probability maps too, and I see that actually the probability map thresholded at 0.3 does not contain holes. The probability map actually seems more accurate in general and picks up on more of the hyperintensities. This is important for my desired outputs (i.e. accurate lesion counts/volumes).
So I wondered if it was possible to explain a little why these holes might be occurring in the final segmentation but not the probability map? Would it be incorrect to derive the lesion mask from the probability map instead?
Apologies I cannot attach the images of the data.
TIA, Evie _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://secure-web.cisco.com/1NpZzM74kNbIUCNiedzVDGdduB098oNmVCEtAhnJ9IbI3sl... 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/1wuLqVSrVsFtDJrhxQBubrzbhEXynocjCAZTZigYYOT90kA... https://secure-web.cisco.com/1wuLqVSrVsFtDJrhxQBubrzbhEXynocjCAZTZigYYOT90kAdkJVQ_RhBBgGlMAmMnSWVZVrtmM72S77FU6gG2LFrZ6ri8TIRoHl9NgpVKf60W-4ndp-_5WjRGa4afbTD034ITJz3qh4bDzQMtrGkCZZbACDUx0N9aQdxpiIXdEiGJG4tVjFBpHPUX1GRH2GOMC0KCUfuyUPS5TZ5XJKi-C2ZMCdQY-h45byI1YeauBxAj3BeItPDt8BbU_8T_RHQU5O5PS7Y-aJRJAN7A1T3omKdprS50s20p48S5f9Zbgrg_P3rnIh0dGWGsGn7hl2r7Hdzzvn0VaXmaQk6PIy-_6w/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline . 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.
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/1wuLqVSrVsFtDJrhxQBubrzbhEXynocjCAZTZigYYOT90kA... .