User Tools

Site Tools


voi.addsphericalvoi
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


voi.addsphericalvoi [2010/06/28 19:07] (current) – created jochen
Line 1: Line 1:
 +====== voi.AddSphericalVOI ======
  
 +===== Motivation =====
 +In many cases, researchers already have a priori selected areas/regions which are candidates for testing specific hypothesis, which gives greater detection power (at least when, on the other hand, researchers apply customary multiple-comparison correction algorithm if they decide to perform whole-brain searches for effects that match their hypothesis!).
 +
 +Often these regions of a priori interest are given as an estimate of a central coordinate around which a spherical shape is defined with a given radius. This method allows to create ROIs that conform with that notion.
 +
 +===== Method reference ('voi.Help('AddSphericalVOI')') =====
 +<file> VOI::AddSphericalVOI  - add a spherically shaped VOI to the object
 + 
 + FORMAT:       [voi = ] voi.AddSphericalVOI(c, r);
 + 
 + Input fields:
 + 
 +                 1x3 coordinate (center)
 +                 1x1 radius (must be > 0 and < 128)
 + 
 + Output fields:
 + 
 +       voi         VOI with added VOI (integer coordinates only!)</file>
 +
 +===== Example =====
 +To add one specific ROI to a new VOI object around, say, coordinate (-24, -4, -22) (the Talairach Atlas resolves to the left Amygdala on that coordinate) with a radius of 6mm, you can use the following code:
 +
 +<code matlab voi_addsphericalvoi_example1.m>% create VOI object
 +voi = xff('new:voi');
 +
 +% add ROI
 +voi.AddSphericalVOI([-24, -4, -22], 6);</code>
 +
 +To add multiple VOIs (e.g. from a table of coordinates), you could use this:
 +
 +<code matlab voi_addsphericalvoi_example2.m>% create VOI object
 +voi = xff('new:voi');
 +
 +% coordinates are in a Cx3 table, ctab, and the radius is fixed at 8mm
 +% alternatively, the radius could be in column 4 in a Cx4 table
 +
 +% iterate over coordinates in table
 +for cc = 1:size(ctab, 1)
 +
 +    % add coordinate
 +    voi.AddSphericalVOI(ctab(cc, 1:3), 8);
 +    % or alternatively:
 +    % voi.AddSphericalVOI(ctab(cc, 1:3), ctab(cc, 4));
 +    
 +end</code>
voi.addsphericalvoi.txt · Last modified: 2010/06/28 19:07 by jochen