Hi Ged,
Thanks for your response. I've tried what you suggested, and the voxel sizes
are different. The voxel size of my ROI is 1x1x1, whereas my statistic image
has voxel sizes of 1.87x1.87x4.95.
I also tried creating a new image, and summing the voxels within it, however
that gave a different response to both the actual volume, and volume given
by SVC. I'll use one of my ROI's in one of my paradigms as an example. The
actual volume (given by both Marsbar and Analyze) is 1685mm^3; the volume
given by SVC in SPM is 1236mm^3; and the volume I obtain using your method
is 1488mm^3.
At the end of the day the reason I brought this topic up is because I would
like to calculate number of activated voxels within the ROI. Using SVC, I
obtain number of activated voxels, however I'm unsure which volume to use,
as I'm unsure whether using SVC, the whole ROI volume was searched for
activation? Reading through your previous email on SVC, I'm assuming the
whole volume ROI volume is searched through, and as such I should use the
actual volume (i.e., 1685mm^3) when determining percentage of activated
voxels within ROI...
If you, or someone, could please shed some further light on this for me, it
would be greatly appreciated.
Regards,
Stephen.
-----Original Message-----
From: Ged Ridgway [mailto:[log in to unmask]]
Sent: Thursday, 6 September 2007 8:19 PM
To: Stephen Duma
Cc: [log in to unmask]
Subject: Re: [SPM] Search Volume Size
Hi Stephen,
> the volume size SPM gives at the bottom of the results table
> is different to the actual volume of the ROI
I've had a quick glance at the code, and can think of a couple of
reasons why this might be the case... The relevant lines from
spm_VOI.m are:
82 XYZmm = SPM.xVol.M(1:3,:)*[SPM.xVol.XYZ; ones(1, SPM.xVol.S)];
117 XYZ = D.mat \ [XYZmm; ones(1, size(XYZmm, 2))];
118 k = find(spm_sample_vol(D, XYZ(1,:), XYZ(2,:), XYZ(3,:),0) > 0);
122 xSPM.S = length(k);
where xSPM.S is the number of voxels, as reported by spm_list.m.
The first line finds the world/mm coordinates for all the voxels
within the original analysis mask, which includes any explicit mask,
and any absolute or relative thresholding that you specified before
estimating the model, and also automatic masking out of any voxels
where the data is constant over all scans. So this is one reason why
your eventual search volume may not match that of your ROI -- namely,
if your ROI includes voxels outside this analysis mask. This could
lead to quite large discrepencies, if e.g. you had a ROI which
included large amounts of non-GM and you'd used threshold-masking
which excluded this. You didn't say how different your results were?
The second line above converts from world/mm space to the voxel space
of the ROI image. The resulting voxel-space coordinates need not be
integer voxel indices; spm_sample_vol will interpolate to the nearest
neighbour (NN interpolation is specified by the final argument of 0).
So if the voxel-dimensions or orientation of your ROI image don't
exactly match that of your statistic image, then the volume in the
statistic image which gets analysed may not match the volume of the
ROI. This should (as far I as I can see) be a very small discrepency.
I would check these two options in reverse order: i.e. first use
spm_check_orientations or similar to verify that your ROI and
statistic images have the same dimensions etc. Then create a new mask
image which is the intersection of your ROI mask and the analysis mask
(saved as mask.img in the results directory) e.g. using imcalc with an
expression of '(i1>0).*(i2>0)'. Then if you sum the voxels in this new
image, e.g. with:
vol = spm_vol('new_mask.img'(;
img = spm_read_vols(vol);
n = sum(img(:) > 0)
hopefully that will match the volume reported by SVC in SPM.
Let me and the list know whether this explains your findings.
Cheers,
Ged.
|