Re: [Freesurfer] hippocampal subfields: from posterior to binary masks
Dear Eugenio, /assign to each voxel the label with the highest posterior probability /implies that each voxel must belong to *one and only one* label, right? I've found that this is not the case with the posterior_*.mgz files outputted by freesurfer, where each voxel (especially the ones with the lower prob values) can belong to multiple labels. The passages I've done to come up at this conclusion was: 1) binarize all the posterior maps 2) summing them up 3) search for values greater than 1 4) if there are values 1, then there are voxels belonging to multiple labels. I've found voxels belonging to 7 different labels at the same time! I think that the posterior files outputted by freesurfer are missing the final step of required to each voxel to the *single* label with the highest posterior prob. I think that a clarification from the developers is needed here. Best regards, Luigi. ___ 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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] hippocampal subfields: from posterior to binary masks
Hi again, Luigi, this sentence that you wrote summarizes everything pretty well: I think that the posterior files outputted by freesurfer are missing the final step of required to each voxel to the single label with the highest posterior prob. We will implement this in the next FS release. Regarding how the discrete labels are computed: For each voxel, one would look at all the posterior probabilities, and assign the label corresponding to the largest posterior. There is a small chance that there is a tie between 2 (or more) classes; in that case, you can pick between those classes at random. Cheers, /Eugenio Juan Eugenio Iglesias Postdoctoral researcher BCBL www.jeiglesias.com www.bcbl.eu Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer - Original Message - From: Luigi Antelmi luigi.ante...@gmail.com To: e iglesias e.igles...@bcbl.eu, freesurfer@nmr.mgh.harvard.edu Sent: Tuesday, September 9, 2014 11:48:10 AM Subject: Re: [Freesurfer] hippocampal subfields: from posterior to binary masks Dear Eugenio, assign to each voxel the label with the highest posterior probability implies that each voxel must belong to one and only one label, right? I've found that this is not the case with the posterior_*.mgz files outputted by freesurfer, where each voxel (especially the ones with the lower prob values) can belong to multiple labels. The passages I've done to come up at this conclusion was: 1) binarize all the posterior maps 2) summing them up 3) search for values greater than 1 4) if there are values 1, then there are voxels belonging to multiple labels. I've found voxels belonging to 7 different labels at the same time! I think that the posterior files outputted by freesurfer are missing the final step of required to each voxel to the single label with the highest posterior prob. I think that a clarification from the developers is needed here. Best regards, Luigi. ___ 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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] hippocampal subfields: from posterior to binary masks
Ok Eugenio, I just have a final consideration. Whenever this last step will be implemented, there will still will be the problem of how to binarize those subfields in a way that makes sense. Plese correct me if I'm wrong: given that at the end counting all the non-zero voxels will always overestimate the volume calculated with kvlQuantifyPosteriorProbabilityImages, one must further threshold the posteriors to make the two measures consistent with each other. Right? Best, Luigi. in order to make the result consistent with the volume calculated by kvlQuantifyPosteriorProbabilityImages, 2014-09-09 11:58 GMT+02:00 Eugenio Iglesias e.igles...@bcbl.eu: Hi again, Luigi, this sentence that you wrote summarizes everything pretty well: I think that the posterior files outputted by freesurfer are missing the final step of required to each voxel to the single label with the highest posterior prob. We will implement this in the next FS release. Regarding how the discrete labels are computed: For each voxel, one would look at all the posterior probabilities, and assign the label corresponding to the largest posterior. There is a small chance that there is a tie between 2 (or more) classes; in that case, you can pick between those classes at random. Cheers, /Eugenio Juan Eugenio Iglesias Postdoctoral researcher BCBL www.jeiglesias.com www.bcbl.eu Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer - Original Message - From: Luigi Antelmi luigi.ante...@gmail.com To: e iglesias e.igles...@bcbl.eu, freesurfer@nmr.mgh.harvard.edu Sent: Tuesday, September 9, 2014 11:48:10 AM Subject: Re: [Freesurfer] hippocampal subfields: from posterior to binary masks Dear Eugenio, assign to each voxel the label with the highest posterior probability implies that each voxel must belong to one and only one label, right? I've found that this is not the case with the posterior_*.mgz files outputted by freesurfer, where each voxel (especially the ones with the lower prob values) can belong to multiple labels. The passages I've done to come up at this conclusion was: 1) binarize all the posterior maps 2) summing them up 3) search for values greater than 1 4) if there are values 1, then there are voxels belonging to multiple labels. I've found voxels belonging to 7 different labels at the same time! I think that the posterior files outputted by freesurfer are missing the final step of required to each voxel to the single label with the highest posterior prob. I think that a clarification from the developers is needed here. Best regards, Luigi. ___ 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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
[Freesurfer] hippocampal subfields: from posterior to binary masks
Dear list members, as you know, the hippocampal subfields given back by FreeSurfer (posterior_left_CA1.mgz, posterior_left_CA2-3.mgz, etc.) are posterior probability maps in the range [0-255] (i.e. [0-1] with 8 bit of quantization). Although there is a way to calculate the volume ( kvlQuantifyPosteriorProbabilityImages) that operates by summing up all the greyscale values https://github.com/neurodebian/freesurfer/blob/master/GEMS/kvlQuantifyPosteriorProbabilityImages.cxx#L107 (an equivalent method is to integrate the histogram over the range 0-255), to my knowledge there is no freesurfer's routine able to extract a binary mask out of the posterior probability map. What procedure do you use or suggest? I think there are two possibilities here. 1) As written in the paper from Van Leeput et al. http://www.ncbi.nlm.nih.gov/pubmed/19405131, I can *assign each voxel to the label with the highest posterior probability*. Althought I'm wondering why such a thing, documented in the paper, has not been implemented yet, I do not think this is the right way to do it because this procedure do not make any distinction between low probability voxels and high prob ones. 2) Threshold the subfields such that the volumes of the thresholded mask will equal those calculated by integrating the histogram on the domain 0-255; Formally, find *t* such that: where *H* is the histogram of the subfield. I prefer the second option because here low prob values are discarded, and because one can apply the equation to a rigid transformed subfield, thus limiting the partial volume effect of the resampling. What do you think about? Luigi. ___ 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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] hippocampal subfields: from posterior to binary masks
Dear all, I just found that the equivalence Volume/integral isn't quite correct. The equivalence must be between the volume and something like an expected value of the histogram V = E[H] = ∫xH(x)*dx* (where x is the greyscale value). So, the point 2) described in my previous email becomes (with some intermediate passages) Find the threshold value *thr* such that: Does this make any sense to you? Luigi. 2014-09-08 9:49 GMT+02:00 Luigi Antelmi luigi.ante...@gmail.com: Dear list members, as you know, the hippocampal subfields given back by FreeSurfer (posterior_left_CA1.mgz, posterior_left_CA2-3.mgz, etc.) are posterior probability maps in the range [0-255] (i.e. [0-1] with 8 bit of quantization). Although there is a way to calculate the volume ( kvlQuantifyPosteriorProbabilityImages) that operates by summing up all the greyscale values https://github.com/neurodebian/freesurfer/blob/master/GEMS/kvlQuantifyPosteriorProbabilityImages.cxx#L107 (an equivalent method is to integrate the histogram over the range 0-255), to my knowledge there is no freesurfer's routine able to extract a binary mask out of the posterior probability map. What procedure do you use or suggest? I think there are two possibilities here. 1) As written in the paper from Van Leeput et al. http://www.ncbi.nlm.nih.gov/pubmed/19405131, I can *assign each voxel to the label with the highest posterior probability*. Althought I'm wondering why such a thing, documented in the paper, has not been implemented yet, I do not think this is the right way to do it because this procedure do not make any distinction between low probability voxels and high prob ones. 2) Threshold the subfields such that the volumes of the thresholded mask will equal those calculated by integrating the histogram on the domain 0-255; Formally, find *t* such that: where *H* is the histogram of the subfield. I prefer the second option because here low prob values are discarded, and because one can apply the equation to a rigid transformed subfield, thus limiting the partial volume effect of the resampling. What do you think about? Luigi. ___ 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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Re: [Freesurfer] hippocampal subfields: from posterior to binary masks
Dear Luigi, the MAP solution (which maximizes the posterior probability of the segmentation given the image and the atlas) is to assign to each voxel the label with the highest posterior probability. The expected value of the volume of a structure is indeed the integral of the its posterior across the image - which can be very different from the volume stemming from counting the voxels in the discrete MAP segmentation. Cheers, /Eugenio Juan Eugenio Iglesias Postdoctoral researcher BCBL www.jeiglesias.com www.bcbl.eu Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer - Original Message - From: Luigi Antelmi luigi.ante...@gmail.com To: freesurfer@nmr.mgh.harvard.edu Cc: Jorge Jovicich jorge.jovic...@unitn.it, Moira Marizzoni mmarizz...@fatebenefratelli.it Sent: Monday, September 8, 2014 3:57:38 PM Subject: Re: [Freesurfer] hippocampal subfields: from posterior to binary masks Dear all, I just found that the equivalence Volume/integral isn't quite correct. The equivalence must be between the volume and something like an expected value of the histogram V = E[H] = ∫xH(x) dx (where x is the greyscale value). So, the point 2) described in my previous email becomes (with some intermediate passages) Find the threshold value thr such that: Does this make any sense to you? Luigi. 2014-09-08 9:49 GMT+02:00 Luigi Antelmi luigi.ante...@gmail.com : Dear list members, as you know, the hippocampal subfields given back by FreeSurfer (posterior_left_CA1.mgz, posterior_left_CA2-3.mgz, etc.) are posterior probability maps in the range [0-255] (i.e. [0-1] with 8 bit of quantization). Although there is a way to calculate the volume ( kvlQuantifyPosteriorProbabilityImages ) that operates by summing up all the greyscale values (an equivalent method is to integrate the histogram over the range 0-255), to my knowledge there is no freesurfer's routine able to extract a binary mask out of the posterior probability map. What procedure do you use or suggest? I think there are two possibilities here. 1) As written in the paper from Van Leeput et al. , I can assign each voxel to the label with the highest posterior probability . Althought I'm wondering why such a thing, documented in the paper, has not been implemented yet, I do not think this is the right way to do it because this procedure do not make any distinction between low probability voxels and high prob ones. 2) Threshold the subfields such that the volumes of the thresholded mask will equal those calculated by integrating the histogram on the domain 0-255; Formally, find t such that: where H is the histogram of the subfield. I prefer the second option because here low prob values are discarded, and because one can apply the equation to a rigid transformed subfield, thus limiting the partial volume effect of the resampling. What do you think about? Luigi. ___ 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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail. ___ 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 Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.