Skip to content

Commit

Permalink
Latest changes to NFT plugin. (#3)
Browse files Browse the repository at this point in the history
* Matitk compiled for OSX

* Fix GUI look for OSX

* Make sure input is pre-processed by freesurfer.

* delete DSL.fig

* dipplot->eeglab_dipplot

* better input validation

* Also update the .fig files

* use parfor

* version 2.3

* Delete backup file

* Import geodesic by Danil Kirsanov,

* change from shared library to MEX via geodesic.cpp

* Use geodesic distances in source space generation

* remove boost dependency and use unique_ptr instead of auto_ptr

* MEX files for windows, linux and OSX

* make it compile with Visual Studio

* Delete metufem.mexa64.orig

* Delete forward.orig

* Add freesurfer_read_surf.m

* Delete geodesic.cpp

* Delete geodesic_memory.h

* auto_ptr->unique_ptr

* Add files via upload

* Delete replay_pid18352.log

* Update remaining files

* remove duplicate usage text
  • Loading branch information
zakalinacar authored Apr 15, 2021
1 parent bf83ff4 commit 135ab2e
Show file tree
Hide file tree
Showing 70 changed files with 7,023 additions and 11,406 deletions.
Binary file modified Distributed_Source_Localization.fig
Binary file not shown.
Binary file modified FP_FEM.fig
Binary file not shown.
43 changes: 30 additions & 13 deletions FP_FEM.m
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,32 @@ function editMeshName_CreateFcn(hObject, eventdata, handles)

function set_session_changed(handles)
% call when any change is made to the session edit boxes
if (handles.session_changed ~= 1)
set(handles.sessionProgressText,'String','Value Changed!');
% if (handles.session_changed ~= 1)
% set(handles.sessionProgressText,'String','Value Changed!');
% set(handles.pushbuttonCreateModel,'Enable','on');
% end
% handles.session_changed = 1;

set(handles.pushbuttonCreateModel,'Enable','off');
name = get(handles.editModelName,'String');
cond1 = str2num(get(handles.editScalpCond, 'String'));
cond2 = str2num(get(handles.editSkullCond, 'String'));
cond3 = str2num(get(handles.editCSFCond, 'String'));
cond4 = str2num(get(handles.editBrainCond, 'String'));

if isempty(get(handles.editMeshName,'String'))
set(handles.sessionProgressText,'String', 'Please load a mesh.');
elseif isempty(name)
set(handles.sessionProgressText,'String', 'Please enter session name.');
elseif ~isfield(handles, 'sensors')
set(handles.sessionProgressText,'String', 'Please load sensors.');
elseif (isempty(cond1) || isempty(cond2) || isempty(cond4))
set(handles.sessionProgressText,'String', 'Please Enter Conductivities');
else
set(handles.sessionProgressText,'String', 'Ready to create Model');
set(handles.pushbuttonCreateModel,'Enable','on');
end
handles.session_changed = 1;

guidata(handles.figure1, handles);


Expand Down Expand Up @@ -298,7 +319,7 @@ function pushbuttonCreateModel_Callback(hObject, eventdata, handles)
errordlg('Mesh must have at least 3 layers');
return
end
name = get(handles.editModelName(),'String');
name = get(handles.editModelName,'String');
if (isempty(name))
errordlg('Please Enter Session Name');
return
Expand Down Expand Up @@ -593,8 +614,8 @@ function pushbuttonLoadSensors_Callback(hObject, eventdata, handles)
end
end
%set_session_changed(handles);
update_display(handles);
%set_session_changed(handles);
%update_display(handles);
set_session_changed(handles);

%

Expand Down Expand Up @@ -689,12 +710,7 @@ function update_display(handles)
%set(handles.editScalpCond,'String',[]);
%set(handles.editSkullCond,'String',[]);
%set(handles.editCSFCond,'String',[]);
%set(handles.editBrainCond,'String',[]);

set(handles.sessionProgressText,'String','No Session');
set(handles.pushbuttonCreateModel,'Enable','off');
handles.session_changed = 0;
guidata(handles.figure1, handles);
%set(handles.editBrainCond,'String',[]);
else
set(handles.editModelName,'String',handles.session.name);
set(handles.editScalpCond,'String',handles.session.cond(1));
Expand All @@ -708,6 +724,7 @@ function update_display(handles)
end
set(handles.sessionProgressText,'String','FEM Session Loaded');
end
set_session_changed(handles);

if isfield(handles,'sensors')
set(handles.editNumberofSensors,'String',length(handles.sensors));
Expand All @@ -720,7 +737,7 @@ function update_display(handles)
set(handles.uipanelCSF, 'visible', 'off')
end
end

% --------------------------------------------------------------------
function Load_Mesh_Menu_Callback(hObject, eventdata, handles)
% hObject handle to Load_Mesh_Menu (see GCBO)
Expand Down
Binary file modified Forward_Problem_Solution.fig
Binary file not shown.
2 changes: 1 addition & 1 deletion Forward_Problem_Solution.m
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ function pushbuttonCreateModel_Callback(hObject, eventdata, handles)
errordlg('Mesh must have at least 3 layers');
return
end
name = get(handles.editModelName(),'String');
name = get(handles.editModelName,'String');
if (isempty(name))
errordlg('Please Enter Model Name');
return
Expand Down
Loading

0 comments on commit 135ab2e

Please sign in to comment.