netstim / leaddbs

Lead-DBS is a MATLAB toolbox facilitating deep brain stimulation electrode localization and connectomic neuroimaging.
https://www.lead-dbs.org
Other
94 stars 98 forks source link

[BUG]: Clicking MER control figure gives error #1196

Open Stefeg opened 4 months ago

Stefeg commented 4 months ago

Describe the bug After plotting my results in 3d view, I click on MER control figure. The MER control window opens for a second and then throws an error 'ea_assignpretra' is not found in the current folder or on the MATLAB path Indeed there is no ea_assignpretra.m file in version 3.1, however I did have this function in version 2.6.

To Reproduce Steps to reproduce the behavior:

  1. Plot a single patient in regular lead DBS in MNI space, I used the DISTAL atlas
  2. When finished plotting, click MER control figure
  3. Error: 'ea_assignpretra' is not found in the current folder or on the MATLAB path, but exists in: F:\Stefanie\lead_orig_2023 %% this is my copy of lead dbs version 2.6

Change the MATLAB current folder or add its folder to the MATLAB path.

Error in MERState/native2mni_fast (line 429) options = ea_assignpretra(obj.Config);

Error in MERState/getMERTrajectory (line 288) startpoint = obj.native2mni_fast(startpoint, traj.side);

Error in ea_resultfig_updatetrajectories (line 27) coords = merstruct.getMERTrajectory(mertraj, spc);

Error in ea_mercontrol>ea_resultfig_update (line 765) ea_resultfig_updatetrajectories(handles);

Error in ea_mercontrol>ea_mercontrol_OpeningFcn (line 113) ea_resultfig_update(handles); % Plot markers and trajs from data.

Error in gui_mainfcn (line 220) feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ea_mercontrol (line 45) [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

Error in ea_openmerviewer (line 4) mercontrolfig = ea_mercontrol(varargin{1}, varargin{2}); % supplying resultfig and options

429 options = ea_assignpretra(obj.Config); Interrupt while evaluating PushTool ClickedCallback.

Expected behavior I expected the MER control figure to appear so I would be able to view offset electrodes

Screenshots

Environment: