<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr">
<div id="OWAFontStyleDivID" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p style="">Hello fieldtrippers,<br>
</p>
<p style=""><br>
</p>
<p style="">I just wanted to check if this is a bug or not.<br>
</p>
<p style=""><br>
</p>
<p style="">When running the following code: atlas = ft_read_atlas( fullfile( matlabrootpath, 'Matlab/fieldtrip/template/atlas/aal/ROI_MNI_V4.nii'))<br>
</p>
<p style=""><br>
</p>
<p style="">It gives you the following:<br>
</p>
<p style=""><br>
</p>
<div> dim: [91 109 91]</div>
<div> hdr: [1x1 struct]</div>
<div> transform: [4x4 double]</div>
<div> unit: 'mm'</div>
<div> tissue: [91x109x91 double]</div>
<div style=""> tissuelabel: {1x116 cell}</div>
<div style=""> coordsys: 'mni'<br>
</div>
<div style=""><br>
</div>
<div style="">Take note that tissuelabel is 1x116<br>
</div>
<div style=""><br>
</div>
<div style="">When running the following code through ft_volumelookup:<br>
</div>
<div style=""><br>
</div>
<div style="">
<div style=""> cfg = [];</div>
<div> cfg.atlas = atlas;</div>
<div> cfg.inputcoord = 'mni';</div>
<div> cfg.maskparameter = 'inside';</div>
<div style=""> labels = ft_volumelookup( cfg, source);<br>
</div>
<div style=""><br>
</div>
<div style="">An error occurs:<br>
</div>
<div style=""><br>
</div>
<div style="">
<div style=""><span style="color: rgb(255, 0, 0);">Error using cat</span></div>
<div><span style="color: rgb(255, 0, 0);">Dimensions of matrices being concatenated are not consistent.</span></div>
<div><br style="color: rgb(255, 0, 0);">
</div>
<div><span style="color: rgb(255, 0, 0);">Error in ft_volumelookup (line 313)</span></div>
<div style=""><span style="color: rgb(255, 0, 0);"> labels.name = cat(1, labels.name, atlas.([fn{k},'label']));</span><br>
</div>
<br>
</div>
If you invert tissuelabel, so that it becomes 116x1, then the code works.<br>
</div>
<div style=""><br>
</div>
<div style="">For some reason ft_volumelookup doesnt like a 1xY cell.<br>
</div>
<div style=""><br>
</div>
<div style="">Thank you,<br>
</div>
<div style=""><br>
</div>
<div style="">Tyler<br>
</div>
<p style=""><br>
</p>
<div>
<p><br>
</p>
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px">*************************
<div style="font-family:Tahoma"><br>
</div>
<div><font face="Arial"><i>Tyler Grummett ( BBSc, BSc(Hons I))</i></font></div>
<div><font face="Arial"><i>PhD Candidate</i></font></div>
<div><font face="Arial"><i>Brain Signals Laboratory</i></font></div>
<div><font face="Arial"><i>Flinders University</i></font></div>
<div><font face="Arial"><i>Rm 5A301</i></font></div>
<div><font face="Arial"><i>Ext 66124</i></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>