Skip to content

Commit

Permalink
Further additions to refine structures pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreashorn committed Jan 25, 2019
1 parent b1f78e4 commit 8fb99be
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ea_autocoord.m
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ function ea_autocoord(options)
ea_subcorticalrefine(options);
end
end

if options.normalize.refine
ea_checkstructures(options);
end

if options.ecog.extractsurface.do
switch options.ecog.extractsurface.method
Expand Down
Binary file modified ea_checkcoreg.fig
Binary file not shown.
15 changes: 15 additions & 0 deletions ea_checkstructures.m
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,10 @@ function checkstructures_CloseRequestFcn(hObject, eventdata, handles)
% Hint: delete(hObject) closes the figure
uuid=getappdata(handles.checkstructures,'fidguiid');
if ~isempty(uuid)


disp('Adding corrections to fiducial markers...');
disp('Remember that changes only take effect if you rerun ANTs-based normalization!');

options=getappdata(handles.checkstructures,'options');
cexpmm=getappdata(handles.checkstructures,'allcexpmm');
Expand Down Expand Up @@ -697,6 +700,18 @@ function checkstructures_CloseRequestFcn(hObject, eventdata, handles)
delete(fullfile(pathn,filen));
end
disp('Done.');

% unapprove normalization since should be redone:
directory=[options.root,options.patientname,filesep];
approved=load([directory,'ea_coreg_approved.mat']);
approved.(ea_stripex(options.prefs.gprenii))=0;
save([directory,'ea_coreg_approved.mat'],'-struct','approved');

if strcmp(computer('arch'),'maci64')
system(['xattr -wx com.apple.FinderInfo "0000000000000000000C00000000000000000000000000000000000000000000" ',ea_path_helper([directory,ea_stripex(options.prefs.gprenii),'.nii'])]);
end


else
delete(hObject);
end
5 changes: 5 additions & 0 deletions ea_handles2options.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
end
end

options.normalize.refine=0;
try
options.normalize.refine=get(handles.refinefit,'Value');
end

try % not working when calling from lead_anatomy
options.coregmr.check=(get(handles.coregmrcheck,'Value') == get(handles.coregmrcheck,'Max'));
catch
Expand Down
Binary file modified lead_dbs.fig
Binary file not shown.
11 changes: 10 additions & 1 deletion lead_dbs.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

% Edit the above text to modify the response to help lead_dbs

% Last Modified by GUIDE v2.5 01-Oct-2018 10:34:41
% Last Modified by GUIDE v2.5 25-Jan-2019 09:22:24

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
Expand Down Expand Up @@ -1902,3 +1902,12 @@ function surfacemethod_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in refinefit.
function refinefit_Callback(hObject, eventdata, handles)
% hObject handle to refinefit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of refinefit

0 comments on commit 8fb99be

Please sign in to comment.