Subsections

Visualization


Binary volumes

Visualization of two masks (binary volumes) available in the Brede Toolbox:

fp = fullfile(fileparts(which('brede')), 'xml'); 
Vbrainmask1 = brede_read_xml2vol(fullfile(fp, 'brainmask1.xml'));

figure
brede_ta3_frame
brede_ta3_volsurf(Vbrainmask1, 'reducepatch', 0.1, 'type', 'edge')

Vcerebellum1 = brede_read_xml2vol(fullfile(fp, 'cerebellum1.xml'));
brede_ta3_volsurf(Vcerebellum1, 'reducepatch', 0.1, 'color', [1 0 0 ])

View supplementary motor area on an structural MRI in MNI space

The following commands find the ``supplementary motor area'' locations in the Brede database and build a probability volume from them, plotting it together with a structural MRI from SPM99. Thus some of the following commands require that SPM99 is installed and in the path.

% Load the Brede database
if ~exist('B')
  load wobibs
end

% Convert to locations
L = brede_bib_bib2loc(B);

% Find supplementary motor area locations
Lsma_tal = brede_loc_select(L, 'where', {'functionalArea' 'findstri' 'supplementary motor'});

% Convert to MNI space
Lsma_mni = brede_loc_xform(Lsma_tal, 'type', 'tal2mni');

% Voxelization of the location to a volume
Vsma = brede_loc_loc2vol(Lsma_mni, 'template', 'spm99_default', 'sigma', 'loocv');
Vsma_p = brede_vol_density2prob(Vsma);

% Load an anatomical volume from SPM99
filename = fullfile(fileparts(which('spm')), 'canonical', 'single_subj_T1');
Vana = brede_read_analyze(filename);

% Plot of the two volumes
figure
brede_ta2_frame('slices', [20:39]*0.002)
brede_ta2_vol(Vana, 'colormap', 'gray')
brede_ta2_vol(Vsma_p, 'threshold', 0.5, 'range', [ 0.4 1], 'alpha', 0.5);

% Additional coordinates - obtained through Steven Haugbøl, NRU.dk
X = [ ...
   4 -21 51 ; ...
   4 -11 52 ; ...
   4 -21 55 ; ...
   4 -11 56 ; ...
   4 -21 60 ; ...
   4 -11 60 ; ...
   4 -22 64 ; ...
   4 -11 65 ; ...
   -4 -32 64 ; ...
   -4 -22 64 ; ...
   -4 -21 60 ; ...
   -4 -11 60 ; ...
   -4 -21 55 ; ...
   -4 -11 56 ; ...
   -4 -21 51 ; ...
   -4 -11 52 ]; 
Lsma_add = brede_loc_mat2loc(X/1000);

% Add them to the plot;
brede_ta2_loc(Lsma_add, 'color', 'b', 'linewidth', 2)
When this figure is printed there are some parameters that should be set in the page setup dialog: ``Keep screen background color'' and ``keep screen limits and ticks''. A PNG file can be constructed with
print -dpng sma.png

Two sets of coordinates

Two sets of coordinates.

X1 = [ ...
   4 -21 51 ; ...
   4 -11 52 ; ...
   4 -21 55 ; ...
   4 -11 56 ; ...
   4 -21 60 ; ...
   4 -11 60 ; ...
   4 -22 64 ; ...
   4 -11 65 ];
X2 = [...
   -4 -32 64 ; ...
   -4 -22 64 ; ...
   -4 -21 60 ; ...
   -4 -31 60 ; ...
   -6 -21 55 ; ...
   -5 -31 56 ; ...
   -6 -21 51 ; ...
   -4 -31 52 ]; 

% Convert to location structure
L1 = brede_loc_mat2loc(X1/1000);
L2 = brede_loc_mat2loc(X2/1000);

figure
brede_ta3_frame    % Talairach frame

brede_ta3_loc(L1, 'color', [1 0 0]);
brede_ta3_loc(L2, 'color', [0 0 1]);



Finn Ã…rup Nielsen 2012-09-27