Images warped with DARTEL may have NaNs in them, that the usual scripts don't
handle so well. This snippet should get around those issues....
V = spm_vol(spm_select(Inf,'Image'));
Vols = zeros(numel(V),1);
tot = 0;
img = spm_slice_vol(V(j),spm_matrix(...
[0 0 i]),V(j).dim(1:2),0);
img = img(isfinite(img)); % <-- exclude non-finite values
tot = tot + sum(img(:));
voxvol = abs(det(V(j).mat))/100^3; % volume of a voxel, in litres
Vols(j) = tot*voxvol;
On Friday 20 June 2008 02:43, MCLAREN, Donald wrote:
> (1) Since you are "modulating" the images, the grey matter volume and white
> matter volumes should be the same between native and normalized images and
> DARTEL images. Modulation preserves the total tissue volume. I should not
> that there may be subtle (and probably non-significant) differences due to
> resampling issues. So... I believe the script should work, as long as it is
> adding up all the volume values in each voxel; although I'm not sure what
> script you are referring to exactly.
> (2) I'm not sure what the best way to perform the analysis, the biggest
> concern is that any mask you use to determine amygdala volume would be
> confounded by how well it overlaps with the amygdala in each subject and if
> any neighboring structures are in the mask. I'm not sure its trival to
> compute regional volumes using an atlas mask. A better approach would be to
> do some form of a subcortical segmentation process to label each structure
> first, then you can compare the volumes in terms of voxel extent. In VBM,
> you can use the wfu_pickatlas to specify which ROIs you will look at;
> however, the shear components in the transforms prevents the wfu_pickatlas
> from being used. It has been suggested that spm_affreg or spm_affinereg
> might produce a nicer transform and when applied to DARTEL would not have a
> shear component and thus could be used with the wfu_pickatlas. I have not
> tried the later.
> On Tue, Jun 17, 2008 at 7:20 PM, Manish Dalwani <[log in to unmask]>
> > Hello SPM'ers
> > I have 2 VBM5 related questions:
> > 1) I used SPM5 for segmentation to created *sn*mat files for the Dartel
> > to read. I then ran Dartel and using John's snippet converted the images
> > from Dartel to MNI space. I had ran the VBM using optimized VBM2 (SPM2)
> > and I could add Total Grey Volume as a covariate in ,y analyses. How can
> > I get this information from SPM5 segmentation and Dartel normalization?
> > Can I use the volume results from VBM5 script in my group analyses for
> > the images generated by DARTEL?
> > 2) How can I calculate volume differences for specific regions? Lets say
> > I see difference in amydgala in the whole brain analyses. Can I get the
> > exact volume (value) that differs? Also, is there any kind of ROI
> > analyses for VBM wherein you can just look at certain regions
> > specifically?
> > Regards,
> > Manish Dalwani
> > Sr.PRA
> > Dept. of Psychiatry
> > University of Colorado