Back to the main page.
Bug 2594 - ft_volumelookup error with row vs column atlas.tissuelabel
Status | CLOSED FIXED |
Reported | 2014-05-29 09:00:00 +0200 |
Modified | 2014-07-15 17:25:08 +0200 |
Product: | FieldTrip |
Component: | core |
Version: | unspecified |
Hardware: | PC |
Operating System: | Windows |
Importance: | P5 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Eelke Spaak - 2014-05-29 09:00:11 +0200
On 29 May 2014 03:56, Tyler Grummett <tyler.grummett@flinders.edu.au> wrote: 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 ************************* Tyler Grummett ( BBSc, BSc(Hons I)) PhD Candidate Brain Signals Laboratory Flinders University Rm 5A301 Ext 66124
Robert Oostenveld - 2014-05-29 11:10:36 +0200
Hi Tyler, thanks for reporting and suggesting the solution, I fixed it. mac011> svn commit ft_volumelookup.m Sending ft_volumelookup.m Transmitting file data . Committed revision 9595.