0001 function pa_brain_input_freesurfer_items(fig)
0002
0003
0004
0005
0006
0007
0008
0009
0010 data = guidata(fig);
0011 H = data.H;
0012
0013
0014 persistent last_dir;
0015 if isempty(last_dir), last_dir = pwd; end
0016
0017
0018 d = dir_dialog(last_dir);
0019 if isempty(d), return; end
0020
0021
0022 try
0023 p = vb_freesurfer_get_files(struct, d);
0024 catch
0025 [msg, msg_f] = vb_get_error_msg(lasterror);
0026 errordlg(msg_f, 'error');
0027 return;
0028 end
0029
0030
0031 last_dir = d;
0032
0033
0034 set(H.freesurfer_left_edit, 'String', p.FS_left_file);
0035
0036
0037 set(H.freesurfer_right_edit, 'String', p.FS_right_file);
0038
0039
0040 set(H.freesurfer_left_inflate_edit, 'String', p.FS_left_infl_file);
0041
0042
0043 set(H.freesurfer_right_inflate_edit, 'String', p.FS_right_infl_file);
0044
0045
0046 set(H.freesurfer_left_curv_edit, 'String', p.FS_left_curv_file);
0047
0048
0049 set(H.freesurfer_right_curv_edit, 'String', p.FS_right_curv_file);
0050
0051
0052 set(H.freesurfer_left_label_edit, 'String', p.FS_left_label_file);
0053
0054
0055 set(H.freesurfer_right_label_edit, 'String', p.FS_right_label_file);
0056
0057
0058 set(H.freesurfer_left_sphere_edit, 'String', p.FS_left_sphere_file);
0059
0060
0061 set(H.freesurfer_right_sphere_edit, 'String', p.FS_right_sphere_file);