SPM99 Gem 19: VBM modulation script
This is the famed script to modulate spatially normalized probability images. For gray matter probability images, modulated images have units of gray matter volume per voxel, instead of gray matter concentration adjusted for differences in local brain size.
In John's own words, here's a better explaination.
Note that script below is SPM99 specific. In SPM2, it is done viaspm_write_sn(V,prm,'modulate')(Seespm_write_snhelp fore more.)
Date: Thu, 27 Jul 2000 14:28:39 +0100 (BST) Subject: Re: matlab question & VBM From: John Ashburner <email@example.com> To: firstname.lastname@example.org, email@example.com | Following on from John Ashburner's recent reply, is there a matlab function | that enables you to adjust spatially normalised images in order to preserve | original tissue volume for VBM? The function attached to this email will do this. Type the following bit of code into Matlab to run it: Mats = spm_get(Inf,'*_sn3d.mat','Select sn3d.mat files'); Images = spm_get(size(Mats,1),'*.img','Select images to modulate'); for i=1:size(Mats,1), spm_preserve_quantity(deblank(Mats(i,:)),deblank(Images(i,:))); end; [...] Best regards, -John
The attached script is here.spm_preserve_quantity.m~