Hi Guillaume,
> i want to turn SPM5 segmentations from grey scale to binary.
> It seems to me that for each voxel, the sum of intensity of the 3
> segmentation
> masks (grey matter, white matter and CS) is 1, representing the
> probability of
> each voxel to be of any sort.
> So i thought put each voxel intensity to 1 in the sort in which it's
> intensity (and probability) is higher, and 0 in others.
> I will obtain binary white and grey matter mask...
Sounds fine to me. I guess you're doing this on the native space
segmentations? It would probably also be true for unmodulated warped,
though I haven't checked how accurately these sum to 1.
It should be fairly easy to use imcalc with an expression like
'(i1>i2)&(i1>i3)' to generate the images you want. Or if you have only
saved c1 and c2 segs, then the sum-to-one constraint should let you
use something like '(i1>i2)&(i1>(1-(i1+i2)))'.
Best,
Ged.
|