Subsections

Volumes

Writing volumes with blobs

The following commands will write two ANALYZE files that have a Gaussian blob in the left and in right hemisphere.

Vleft = brede_loc_loc2vol(brede_loc_mat2loc([-0.03 0 0 ]))
brede_write_analyze(Vleft, 'filename', 'left')

Vright = brede_loc_loc2vol(brede_loc_mat2loc([0.03 0 0 ]))
brede_write_analyze(Vright, 'filename', 'right')
The orientation in the files are written so the left voxels appear first in the files.

Generating volumes from information in the Brede Database

``Experiments'' (EXP)

-- Are there volumes to download for WOEXP 454 as displayed on http://hendrix.imm.dtu.dk/services/jerne/brede/WOEXP_454.html ?

-- Yes and no. They are not (yet) available directly on the Internet, but they can be constructed with the functions in the Brede Toolbox. Construction of a volume for, say, WOEXP 454 (i.e., experiment #454 in the Brede Database) is the easiest:

load wobibs

% Convert to experiment ('exp' structures)
E = brede_bib_bib2exp(B);

% Find the WOEXP 454 study:
i = brede_struct_select(E, 'select', 'INDEX', 'where', {'woexp' '==' 454});

% Get the locations from the experiment
L = E{i}.Loc; 

% Convert Talairach coordinates to MNI space
Lmni = brede_loc_xform(L, 'type', 'tal2mni');

% Convert to volume
Vdensity = brede_loc_loc2vol(Lmni, 'template', 'spm99_template')
Vprobability = brede_vol_density2prob(Vdensity);

% Write an ANALYZE file
brede_write_analyze(Vprobability, 'filename', 'woexp454')
The volume is written in ``left is first'' (SPM99) format. The volume and the Talairach coordinates can be visualized with:
figure, brede_ta3_frame, brede_ta3_loc(L)
brede_ta3_loc(Lmni, 'color', [1 0 0])
brede_ta3_volsurf(Vprobability, 'type', 'edge', 'isoabsolute', 0.5)

``External components'' (EXT)

-- Are there volumes to download for WOEXT 14 as displayed on http://hendrix.imm.dtu.dk/services/jerne/brede/WOEXT_14.html ?

-- Yes and no. They are not directly available on the Internet, but they can be constructed with the Brede Toolbox.

An external component might be a ``cognitive component'' and they are uniquely identified in the Brede Database with the WOEXT identifier, e.g., WOEXT 14 is ``Audition''. Typically ``experiments'' in the Brede Database will be labeled with one or more ``external components''. The below code reads data from the Brede Database and extracts locations from the experiments that are labeled with ``Audition'' or its taxonomic children. After that kernel density estimation is used to convert the set of locations to a volume, that lastly is saved as an Analyze file.

% Load database
load wobibs
load woexts

% Get all experiments from the Brede database
E = brede_bib_bib2exp(B);

% Adjacency matrix for "external component" taxonomy
Mext = brede_ext_ext2mat(T);

% EXT identifiers for WOEXT 14 and its children
woext14children = [ 14 brede_mat_descendants(Mext, 'node', 14) ]

% Extract experiments that matchs the WOEXT
I = [];
for n = 1:length(woext14children)
  I = [ I brede_struct_select(E, 'select', 'INDEX', ...
      'where', { 'woext' 'any(==)' woext14children(n) }) ];
end
E14 = E(unique(I));

% Extract location
L14 = brede_exp_exp2loc(E14);

% Convert from Talairach-space to MNI-space
L14mni = brede_loc_xform(L14, 'tal2mni')

% Voxelize the experiments with a sigma=7mm Gaussian kernel
V14 = brede_loc_loc2vol(L14mni, 'Sigma', 0.007 );

% Convert voxel values to ranges between 0 and 1
V14p = brede_vol_density2prob(V14);

% Write volume
brede_write_analyze(V14p, 'filename', 'woext14')

Brain regions (ROI)

Are there volumes to download for WOROI 20 as displayed on http://hendrix.imm.dtu.dk/services/jerne/brede/WOROI_20.html?

% Load database
load wobibs
load worois

% Get all locations from the Brede database
L = brede_bib_bib2loc(B);

% Get names for WOROI 20
names = brede_roi_roi2names(R{20});

% Extract indices for locations matching the WOROI 20 names
I = [];
for n = 1:length(names)
  I = [ I brede_struct_select(L, 'select', 'INDEX', ...
	'where', { 'lobarAnatomy' 'strcmpi', names{n}}) ];
end

% Extract WOROI 20 locations
L20 = L(I);

% Convert from Talairach-space to MNI-space
L20mni = brede_loc_xform(L20, 'tal2mni');

% Voxelize the experiments with a sigma=7mm Gaussian kernel
V20 = brede_loc_loc2vol(L20mni, 'Sigma', 0.007 );

% Convert voxel values to ranges between 0 and 1
V20p = brede_vol_density2prob(V20);

% Write volume
brede_write_analyze(V20p, 'filename', 'woroi20')

Finn Årup Nielsen 2012-09-27