Also could try i1&i2&i3&i4&i5&i6 in one step. Or all(X) and pick Options$B"*(B
Data matrix = yes. This is useful for many images. Might want the output to
be datatype int8.
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On
Behalf Of Jonathan Peelle
Sent: 28 July 2009 18:07
To: [log in to unmask]
Subject: Re: [SPM] help for intersect
> I have 6 binary masks of lesions (patients with stroke) and I would like
> obtain the intersect between them (the part of the mask which is commun to
> all of them).
If you have 6 binary masks and want to find the intersection, you can
just sum them up and find where this summed image is equal to 6 (since
that would indicate the voxels that had a 1 for each patient).
(a) Select your 6 masks in ImCalc and add them up to created a summed
image (this can also be helpful in displaying the number of patients
who have a mask at each point):
(b) As a second stage, select the output image from above, and see
where it is equal to 6:
[If the above doesn't produce the result you want, try i1>5.9;
sometimes rounding errors will produce an empty image when there
should be values that equal 6.]
The output of (b) should be a binary mask of the intersection.
Hope this helps,