Diff for "BatchSmallVolumeCorrections" - MRC CBU Imaging Wiki
location: Diff for "BatchSmallVolumeCorrections"
Differences between revisions 1 and 2
Revision 1 as of 2010-01-05 18:01:57
Size: 1598
Editor: JohanCarlin
Comment:
Revision 2 as of 2013-03-07 21:24:04
Size: 1597
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
The standard small volume correction function in SPM5 (spm_VOI) requires input from the GUI for certain parameters (e.g., the shape of the VOI), and hardcodes others (e.g., the number and spacing of maxima in the table). [attachment:spm_VOI_Custom.m This function] is a variant of the default spm_VOI that includes a struct for setting custom parameters. The standard small volume correction function in SPM5 (spm_VOI) requires input from the GUI for certain parameters (e.g., the shape of the VOI), and hardcodes others (e.g., the number and spacing of maxima in the table). [[attachment:spm_VOI_Custom.m|This function]] is a variant of the default spm_VOI that includes a struct for setting custom parameters.
Line 6: Line 6:
To use this function, bring up some results in SPM (you can [wiki:SpmBatchPrintContrasts automate this process too]) to define the necessary SPM, xSPM and hReg inputs. Then, try something like: To use this function, bring up some results in SPM (you can [[SpmBatchPrintContrasts|automate this process too]]) to define the necessary SPM, xSPM and hReg inputs. Then, try something like:

Batch processing of small volume corrections

The standard small volume correction function in SPM5 (spm_VOI) requires input from the GUI for certain parameters (e.g., the shape of the VOI), and hardcodes others (e.g., the number and spacing of maxima in the table). This function is a variant of the default spm_VOI that includes a struct for setting custom parameters.

The standard spm_VOI is called with table = spm_VOI(SPM, xSPM, hReg). spm_VOI_custom works exactly the same way, but also takes an optional third CustomParameters input. CustomParameters is a struct that contains any of up to 5 parameters. If the xyzmm, SPACE and D parameters are defined, extracting the results table for a VOI becomes fully automatic with no GUI input required.

To use this function, bring up some results in SPM (you can automate this process too) to define the necessary SPM, xSPM and hReg inputs. Then, try something like:

% Produces the same output as spm_VOI or just using the small volume button in the GUI
T = spm_VOI_custom(SPM,xSPM,hReg);

% Now let's specify some custom settings
CustomParameters.Num = 8; % maxima per cluster (default 16)
CustomParameters.Dis = 8; % distance among maxima (mm, default 4)
CustomParameters.xyzmm = [10 -10 10]; % custom centre coordinates (mm)
CustomParameters.SPACE = 'S'; % Spherical VOI
CustomParameters.D = 15; % radius (mm) in the case of a spherical VOI

% This table should look quite different
T2 = spm_VOI_custom(SPM,xSPM,hReg,CustomParameters);

(JohanCarlin)

CbuImaging: BatchSmallVolumeCorrections (last edited 2013-03-07 21:24:04 by localhost)