Tagged: bug, plot, visualization
-
AuthorPosts
-
06/06/2017 at 10:02 AM #2713tsiegerParticipant
Hi,
first of all, I must express my deep admiration for LeadDBS – running it for the first time, I could not believe that it is written in Matlab (so great features, graphics, and interactivity!).Let me ask a question regarding the “Write out 2D” feature. When I try to “Write out 2D” after I successfully finished all the preceding steps (and could even “Render 3D”), a transversal slice appears with some contour superimposed on it, but then the code fails with:
Exporting 2D slice output... Electrode(s) k0, tra view: z = -10.9844 mm. Error using plot Color value must be a 3 element vector Error in ea_add_overlay (line 175) plot(cscale(1,:),cscale(2,:),'color',options.d2.con_color); Error in ea_writeplanes (line 177) cuts=ea_add_overlay(boundboxmm,cuts,tracor,options); Error in ea_write (line 38) cuts=ea_writeplanes(options); Error in ea_autocoord (line 200) ea_write(options) Error in ea_run (line 95) ea_autocoord(options); Error in lead_dbs>run_button_Callback (line 190) ea_run('run',options); Error in gui_mainfcn (line 95) feval(varargin{:}); Error in lead_dbs (line 43) gui_mainfcn(gui_State, varargin{:}); Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)lead_dbs('run_button_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating UIControl Callback
The problem is that
options.d2.con_color
is a single number, not a vector of length 3, as expected byplot
. Not sure whether this is a matlab problem, or I have misconfigured something?I’m using LeadDBS 1.6.3.4 (no update available) and the same problem can be reproduced using the current devel version from GitHub.
My matlab version: R2016a (9.0.0.341360) 64-bit (glnxa64).Best,
Tomas06/06/2017 at 11:39 AM #2716ningfeiKeymasterHi Tomas,
Thank you for the kind words!
Could try the following steps to see if it solves your problem?
0. Clike the “2D Settings” button
1. In the popup “Specify 2D Output Options” window , click “Contour Colors” button
2. In the popup “Color” window, click “OK”
3. Back to “Specify 2D Output Options” window, click “Save and Close”
4. Try again to see if it works.You may also want to apply the hotfix (which is updated several times a day) to update LEAD to latest pre-release version. It might also solve some issues. To do so, you could either use “Apply Hotfix” from “Install” menu, or download the hotfix from here and then extract it to LEAD directory.
Best,
Ningfei06/06/2017 at 1:14 PM #2719tsiegerParticipantHi Ningfei,
thanks for your quick reply. Yes, the steps you suggested resolved the issue.(And the hotfix I applied later on also solved this warning, which appeared after setting the color manually:
“Warning: The LineSmoothing property will be removed in a future release.
> In ea_writeplanes (line 316))
Thanks a lot!
best,
Tomas06/06/2017 at 1:19 PM #2720andreashornKeymasterGlad that it works! Re warnings, these can usually be safely ignored. We are a bit lazy in getting rid of warnings – so they are usually totally fine/planned in Lead-DBS.
Have fun! -
AuthorPosts
- The forum ‘Support Forum (ARCHIVED – Please use Slack Channel instead)’ is closed to new topics and replies.