[FieldTrip] possible bug with either ft_volumelookup or AAL atlas

Tyler Grummett tyler.grummett at flinders.edu.au
Thu May 29 03:56:15 CEST 2014

Hello fieldtrippers,

I just wanted to check if this is a bug or not.

When running the following code:    atlas = ft_read_atlas( fullfile( matlabrootpath, 'Matlab/fieldtrip/template/atlas/aal/ROI_MNI_V4.nii'))

It gives you the following:

            dim: [91 109 91]
            hdr: [1x1 struct]
      transform: [4x4 double]
           unit: 'mm'
         tissue: [91x109x91 double]
    tissuelabel: {1x116 cell}
       coordsys: 'mni'

Take note that tissuelabel is 1x116

When running the following code through ft_volumelookup:

            cfg = [];
            cfg.atlas = atlas;
            cfg.inputcoord = 'mni';
            cfg.maskparameter = 'inside';
            labels = ft_volumelookup( cfg, source);

An error occurs:

Error using cat
Dimensions of matrices being concatenated are not consistent.

Error in ft_volumelookup (line 313)
    labels.name = cat(1, labels.name, atlas.([fn{k},'label']));

If you invert tissuelabel, so that it becomes 116x1, then the code works.

For some reason ft_volumelookup doesnt like a 1xY cell.

Thank you,



Tyler Grummett ( BBSc, BSc(Hons I))
PhD Candidate
Brain Signals Laboratory
Flinders University
Rm 5A301
Ext 66124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140529/41aa969f/attachment-0001.html>

More information about the fieldtrip mailing list