Hi, experts, I am interested in only the positive sulc and would like to make group analysis of the postive sulc values. Hence I would like to mask off the negative values (as the lh.sulc file has both positive and negative value). Before making group analysis, I have to resample and smooth the sulc value. How do I smooth the positive sulc in a way that the negative sulc values will not have an effect on the smoothing process? Example if I smooth the positive sulc directly with the negative values, it will have some effect on the positive values since gyri and sulci are alternating. you suggest me using mri_binarize and mri_fwhm to make a mask and smooth it with a mask. As suggested, I have done so. However, there is a problem I can not tackle. Using mri_binarize --i lh.sulc --min 0 --o lh.such.mask.mgh When I read the lh.such.mask.mgh into matlab so that I can see the data inside. To my surprise, I saw a vector which contains nearly all 0's except some very small numbers like 1.401298464324817e-45, not binary file which contains only 0's and 1's. I further tried: mri_binarize --i lh.sulc --min 0 --o lh.such.mask.mgh --binval 1 It has the same problem as above. After launching: mris_fwhm --i sulc --subject Ad001 --surf white --mask lh.such.mask.mgh --hemi lh --fwhm 20 --o lh.sulc.mgh I read lh.sulc.mgh into matlab, it contains all 0's. I read the mgh file using Keith worsley's SurfStatReadData function.
I do not know where it is wrong. Thank doug for your helpful suggestions! Thank you very much! yuanchao
___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/
Zhangyuanchao wrote:
I would like to mask off the negative values (as the lh.sulc file has both positive and negative value).
Another way to filter the sulc is:
$>mris_calc -o lh.sulc.pos lh.sulc gte 0
which filters 'lh.sulc' and only lets values that are greater than or equal to 0 through. All other values are set to zero. Results are saved to 'lh.sulc.pos'.
Similarly,
$>mris_calc -o lh.sulc.neg lh.sulc lt 0
Will filter through all the values that are less than zero, setting all others to zero, and saving to 'lh.sulc.neg'.
Before making group analysis, I have to resample and smooth the sulc value. How do I smooth the positive sulc in a way that the negative sulc values will not have an effect on the smoothing process?
If you just want to mitigate against the boundary effects of switching from positive to negative for your smoothing, having all the negative values set to 0 will probably go a long way to reducing the effect. You could replace all the negative values in the original file with whatever arbitrary value you'd like:
$>mris_calc -o lh.sulc.neg.bin lh.sulc.neg div lh.sulc.neg
which divides 'lh.sulc.neg' by itself, resulting in a file that is contains '1' for all the negative values, and '0' elsewhere. If you then do
$>mris_calc -o lh.sulc.p1 lh.sulc.pos add lh.sulc.neg.bin
the result should be a file 'lh.sulc.p1' that has all the original positive values unchanged, and replaced all the original negative values with '1'. Of course, you can set the bin value in 'lh.sulc.neg.bin' to whatever you'd like by first multiplying it by the desired value:
$>mris_calc -o lh.sulc.neg.bin.f lh.sulc.neg.bin mul 0.01
would create lh.sulc.neg.bin.f with values of 0 and 0.01...
freesurfer@nmr.mgh.harvard.edu