help > Problem with WFU PickAtlas Results Viewer
Showing 1-3 of 3 posts
Display:
Results per page:
Apr 23, 2018  05:04 PM | huilee92
Problem with WFU PickAtlas Results Viewer
I have two versions of MatLab on my laptop, 2015a and 2016b. Currently, I am using 2015a for my data analysis.

Recently, I encountered this issue. Whenever I tried to open the results viewer of the WFU PickAtlas using SPM 12 (regardless which version of the MatLab), the error message will always appear.

Using SPM8_lite, adding (spm_lite) to path.
Warning: Name is nonexistent or not a directory: spm_lite
> In path (line 109)
In addpath (line 86)
In wfu_results_defaults (line 31)
In wfu_results_viewer>wfu_results_OpeningFcn (line 103)
In gui_mainfcn (line 220)
In wfu_results_viewer (line 70)
In wfu_pickatlas>paresults_Callback (line 3007)
In wfu_pickatlas (line 110)
In @(hObject,eventdata)wfu_pickatlas('paresults_Callback',hObject,eventdata,guidata(hObject))
23-Apr-2018 22:33:17 | ERROR | wfu_results_viewer.m | MException thrown. Stack follows:
23-Apr-2018 22:33:17 | ERROR | wfu_results_compute | Line 0072: Reference to non-existent field 'SPM'.
23-Apr-2018 22:33:17 | ERROR | File_Open_Callback | Line 0468
23-Apr-2018 22:33:17 | ERROR | gui_mainfcn | Line 0095
23-Apr-2018 22:33:17 | ERROR | wfu_results_viewer | Line 0070
23-Apr-2018 22:33:17 | ERROR | @(hObject,eventdata)wfu_results_viewer('File_Open_Callback',hObject,eventdata,guidata(hObject)) | Line 0000

I have tried various ways (including reinstall all the relevant software, open the spm.mat files in different laptops), the error message still appears until today. My colleagues used to encounter the same problems but they have no idea how it was solved as well. Actually, I have encountered this problem a few months ago and I thought it was solved eventually until today. I have no clue how it was done during that time. 

Does anyone have the ideas?
Jun 16, 2021  01:06 PM | scchester
RE: Problem with WFU PickAtlas Results Viewer
Hi huilee92, 

I am having this same issue. Just wondered if you ever managed to find an answer?

Many thanks,
Sally
Nov 17, 2025  06:11 AM | Yoshikazu Nakano
RE: Problem with WFU PickAtlas Results Viewer

Hi huilee92 and scchester,


I just encountered exactly the same error with WFU_PickAtlas “Results Viewer” under SPM12 + MATLAB R2024a:





 



Using SPM8_lite, adding (spm_lite) to path.
Warning: Name is nonexistent or not a directory: …/spm_lite

ERROR │ wfu_results_defaults │ Line 0052: Array dimensions must agree.


From extensive debugging I found the cause: in wfu_results_defaults.m, around line 46-53 the code does:





 



hind = find(h >= 0);
vind = find(v >= 0);
screenIndex = min(find(hind == vind));


In MATLAB R2024a (and in some multi-monitor setups) the vectors hind and vind may differ in length, so hind==vind leads to the “Array dimensions must agree” error.


Fix: replace that block with something like





 



idx = intersect(hind, vind);
if isempty(idx)
screenIndex = 1;
else
screenIndex = idx(1);
end


After applying this patch and restarting MATLAB, the Results Viewer now works correctly in my setup.


If you like, I can share the full patched wfu_results_defaults.m and my version details (MATLAB R2024a, SPM12 r7771, PickAtlas 3.0.5b).


Note: If you're searching for wfu_results_defaults.m: it's located in .../wfu_results/private/ — being under a private/ folder, it won't show up using which or edit unless called from the parent function.


 


Hope this helps you too!


Best wishes,


Yoshikazu Nakano