Hi, Eugenio Just noticed the first lines of aseg.stats. From the command line recon-all pipeline uses to make the original aseg.stats file it uses norm.mgz so I think it is the best file to use for intensity comparisons like I proposed. Thank you. Marcos Em Qua, 2013-06-12 às 13:33 -0300, Marcos Martins da Silva escreveu:
> Hi, Eugenio > Hmmm, I guessed the values I got were different because they > represented different stages of the processing. And you just confirmed > that. Thank you. I would like to compare these intensities with the > intensities I can read in aseg.stats. And I guess the comparison > would be more interesting if I use the same source. > Cheers, > Marcos > Em Ter, 2013-06-11 às 17:13 -0400, Juan Eugenio Iglesias escreveu: > > > Dear Marcos, > > these are just mean and standard deviations of intensities of the images > > at different levels of processing. What the best measure is depends on > > what you want to do with them. > > Cheers, > > /Eugenio > > > > On Tue, 2013-06-11 at 11:46 -0300, Marcos Martins da Silva wrote: > > > Hi, Eugenio, > > > TY again for your help. I did the computing without errors after your > > > suggestions. I also computed the intensities based on nu.mgz, norm.mgz > > > and T1.mgz. I would like to know the best measure I should consider, > > > including because I intend to compare these values with intensity data > > > from basal ganglia and cortical areas as I can find in aseg.stats. It > > > follows my results: > > > norm.mgz based > > > meannorm= 78.725 > > > variancenorm = 20.258 (stdev = 4.500888801) > > > > > > nu.mgz based > > > meannu = 87.362 > > > variancenu = 26.343 (stdev =5.132543229) > > > > > > T1.mgz based > > > meant1 = 84.023 > > > variancet1 = 23.277 (stdev =4.824624338) > > > > > > > > > It follows the MatLab/Octave code I used > > > Norm=MRIread('norm_postres.mgz'); > > > datanorm=Norm.vol(:); > > > Ps=nMRIread('posterior_right_subiculum.mgz'); > > > postsub=double(Ps.vol(:)); > > > meannorm=sum(datanorm.*postsub)/sum(postsub); > > > variancenorm=sum((datanorm-meannorm).^2.*postsub)/sum(postsub); > > > Nu=MRIread('nu_postres.mgz'); > > > datanu=Nu.vol(:); > > > meannu=sum(datanu.*postsub)/sum(postsub); > > > variancenu=sum((datanu-meannu).^2.*postsub)/sum(postsub); > > > T1=MRIread('T1_postres.mgz'); > > > datat1=T1.vol(:); > > > meant1=sum(datat1.*postsub)/sum(postsub); > > > variancet1=sum((datat1-meant1).^2.*postsub)/sum(postsub); > > > > > > The *postres.mgz files are nu, norm and T1 resampled as you suggested. > > > And nMRIread is the workarounded version of MRIread I said in previous > > > message. > > > Cheers, > > > Marcos > > > Em Seg, 2013-06-10 às 16:58 -0400, Juan Eugenio Iglesias escreveu: > > > > Hi Marcos, > > > > 1. your fix of MRIread.m is great. I forgot of this bug; we should > > > > totally take care of it. > > > > 2. a problem is that nu.mgz (or norm.mgz) and the posteriors are in > > > > difference voxel space. So, you need to resample norm.mgz to the space > > > > of the subfields. To do so, you can use mri_convert with the option -rl > > > > ("reslice like"): > > > > mri_convert norm.mgz norm_resampled.mgz -rl posterior_subiculum.mgz > > > > 3. Now you can do: > > > > A=MRIread('norm.mgz'); > > > > data=A.vol(:); > > > > B=MRIread('posterior_subiculum.mgz'); > > > > post=double(B.vol(:)); > > > > mean=sum(data.*post)/sum(post); > > > > variance=sum((data-mean).^2.*post)/sum(post); > > > > Cheers, > > > > /Eugenio > > > > > > > > On Mon, 2013-06-10 at 17:17 -0300, Marcos Martins da Silva wrote: > > > > > Hi, Eugenio > > > > > TY for your fast help. I understood you were suggesting to compute > > > > > that on MatLab and I tried this: > > > > > > > > > > NU=MRIread('nu.mgz') ### that runs ok > > > > > Ps=MRIread('posterior_left_subiculum.mgz') ### it fails with the > > > > > following message > > > > > WARNING: error reading MR params > > > > > Attempted to access mr_parms(1); index out of bounds because > > > > > numel(mr_parms)=0. > > > > > > > > > > Error in MRIread (line 100) > > > > > tr = mr_parms(1); > > > > > > > > > > I solved creating a little customized nMRIread.m with the following > > > > > changes: > > > > > > > > > > if numel(mr_parms) > 0 > > > > > tr = mr_parms(1); > > > > > flip_angle = mr_parms(2); > > > > > te = mr_parms(3); > > > > > ti = mr_parms(4); > > > > > else > > > > > mr_parms(1) = 0; > > > > > mr_parms(2) = 0; > > > > > mr_parms(3) = 0; > > > > > mr_parms(4) = 0; > > > > > tr = mr_parms(1); > > > > > flip_angle = mr_parms(2); > > > > > te = mr_parms(3); > > > > > ti = mr_parms(4); > > > > > end > > > > > > > > > > With those changes I assigned 0 to mr-parms elements so it runs > > > > > without errors > > > > > But whe I tried the following line I copy and pasted from your > > > > > message: > > > > > mean=sum(Ps.*NU)/sum(Ps); ### I got the following error > > > > > Undefined function 'times' for input arguments of type 'struct'. > > > > > > > > > > Any help? > > > > > Cheers, Marcos > > > > > > > > > > PS: I promised I will post the final solution to list. But I guess it > > > > > is more didactic if these little problems are solved before. > > > > > TY, again. > > > > > Em Seg, 2013-06-10 às 14:19 -0400, Juan Eugenio Iglesias escreveu: > > > > > > Hi Marcos, > > > > > > the right way of doing this is using the soft posteriors to compute > > > > > > the > > > > > > mean and variance, rather than thresholding at p=0.5. For instance, > > > > > > if > > > > > > you wanted to compute the mean and variance of the intensitites of > > > > > > the > > > > > > subiculum, you would do something like this: > > > > > > mean=sum(Ps.*NU)/sum(Ps); > > > > > > variance=sum(Ps.*(NU-mean).^2)/sum(Ps); > > > > > > (where Ps is the posterior of the subiculum) > > > > > > Cheers, > > > > > > /Eugenio > > > > > > > > > > > > > > > > > > > > > > > > On Mon, 2013-06-10 at 15:12 -0300, Marcos Martins da Silva wrote: > > > > > > > Hi, Freesurfer Experts > > > > > > > > > > > > > > After usual processing with recon-all -all we get the aseg.stats > > > > > > > file > > > > > > > with several data including intensity values like: > > > > > > > normMean > > > > > > > normStdDev > > > > > > > normMin normMax normRange > > > > > > > Left-Hippocampus 77.8939 7.5748 46.0000 > > > > > > > 105.0000 59.0000 > > > > > > > > > > > > > > How could I get similar results for each hippocampal subfield, > > > > > > > assuming I also generated all posterior*.mgz files corresponding > > > > > > > to > > > > > > > each subfield? > > > > > > > I guess I should first binarize each of the subfields file with a > > > > > > > threshold=127 to map all the pertinent voxels, and then use these > > > > > > > files as masks over nu.mgz and calculate the intensities values. > > > > > > > But I > > > > > > > do not know the best way to accomplish this after the binarize > > > > > > > step. > > > > > > > > > > > > > > Thank you in advance for any help. > > > > > > > > > > > > > > Marcos > > > > > > > _______________________________________________ > > > > > > > Freesurfer mailing list > > > > > > > Freesurfer@nmr.mgh.harvard.edu > > > > > > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > > > > > > > > > > > > > > > > > > > >
_______________________________________________ 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.