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...
--
Rudolph Pienaar, M.Eng, D.Eng / email: rudo...@nmr.mgh.harvard.edu
MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
149 (2301) 13th Street, Charlestown, MA 02129 USA
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer