[Master Index] [Index for export/brede]

brede_loc_loc2mat

(export/brede/brede_loc_loc2mat.m)


Function Synopsis

M = brede_loc_loc2mat(L, varargin)

Help text

 brede_loc_loc2mat    - Convert 'loc' to 'mat' structure

       function M = brede_loc_loc2mat(L, varargin)

       Input:      L     'Loc' structure

       Property:   Info  [ {0} | Value ] Amount of debug information 
                   LabeledVolume  'Vol' structure with labeled volume  
                   Roi   Region of interest structures
                   Type  [ {Coord} | FunctionalArea | LobarAnatomy |
                         VolumeLabels | Woroi ] Type of matrix
                         constructed  

       Output:     M     'Mat' structure

       This function constructs a 'mat' structure (containing a
       numerical matrix) from 'loc' structures (usually containing
       Talairach coordinates).

       By default (type=coord) it will use the information from the
       'coord' field in the 'loc' structure (the Talairach
       coordinates) to fill in the 'matrix' field in the 'mat'
       structure. The size of the 'matrix' field will be Nx3 where N
       is the length of L. If the 'coord' field is not available
       in the structure then the 'x', 'y' and 'z' fields will be used.

       For type=LobarAnatomy a (Loc x term)-matrix will be
       constructed as a bag-of-words matrix for the lobarAnatomy
       field.

       For type=VolumeLabels a (Loc x labels)-matrix will be
       constructed which is a binary matrix where "1" in the (i,j)
       element indicates that the i'th location has the j'th
       label, where the label is determined by a lookup in the
       nearest voxel of a labeled volume. It is necessary to set the
       'LabeledVolume' property for this to work.

       For type=woroi and (loc x woroi)-matrix is construct were the
       columns each correspond to a specific item in the Brede
       Database brain region ontology (woroi). Not all locations are
       necessarily linked to a specific item. The match is based upon
       the 'lobarAnatomy' field of the input 'Loc' structures.

       Example: 
         Lx{1}.coord = [ -45 17 -3 ] / 1000;
         Lx{2}.coord = [ -32 -2 -45 ] / 1000;
         brede_loc_loc2mat(Lx);

         % A matrix constructed from the AAL labeled volume in MRIcro 
         f = fullfile(fileparts(which('brede')), 'data');
         f = fullfile(f, 'LawI1997Activation_1.csv');
         L = brede_read_csv2loc(f);
         [s,w] = unix('which startmricro'); 
         filename = fullfile(fileparts(w), 'mricro', 'aal');
         Vaal = brede_read_analyze(filename);
         M = brede_loc_loc2mat(L, 'Type', 'VolumeLabels', 'LabeledVolume', Vaal)
         brede_ui_mat(M)

       See also BREDE, BREDE_LOC, BREDE_MAT, BREDE_ROI,
                BREDE_LOC_LABEL, BREDE_MAT_MAT2LOC,
                BREDE_ROI_ROI2MAT, BREDE_STR_STR2MAT.  

 $Id: brede_loc_loc2mat.m,v 1.11 2008/04/01 16:49:15 fn Exp $

Cross-Reference Information

This function calls
This function is called by

Produced by mat2html on Fri Jun 20 17:43:05 2008
Cross-Directory links are: OFF