Home > vbmeg > functions > gui > preAnalysis > brain > pa_brain_input_freesurfer_items.m

pa_brain_input_freesurfer_items

PURPOSE ^

Input freesurfer files just specifying directories.

SYNOPSIS ^

function pa_brain_input_freesurfer_items(fig)

DESCRIPTION ^

 Input freesurfer files just specifying directories.
 [IN]
    fig : figure handle of GUI.
 [OUT]
    none
 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function pa_brain_input_freesurfer_items(fig)
0002 % Input freesurfer files just specifying directories.
0003 % [IN]
0004 %    fig : figure handle of GUI.
0005 % [OUT]
0006 %    none
0007 % Copyright (C) 2011, ATR All Rights Reserved.
0008 % License : New BSD License(see VBMEG_LICENSE.txt)
0009 
0010 data = guidata(fig);
0011 H = data.H;
0012 
0013 % previous choosen directory
0014 persistent last_dir;
0015 if isempty(last_dir), last_dir = pwd; end
0016 
0017 % show directory dialog
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 % update previous choosen directory
0031 last_dir = d;
0032 
0033 % 'FS_LEFT_BRAIN'
0034 set(H.freesurfer_left_edit, 'String', p.FS_left_file);
0035 
0036 % 'FS_RIGHT_BRAIN'
0037 set(H.freesurfer_right_edit, 'String', p.FS_right_file);
0038 
0039 % 'FS_LEFT_INFLATE_BRAIN'
0040 set(H.freesurfer_left_inflate_edit, 'String', p.FS_left_infl_file);
0041 
0042 % 'FS_RIGHT_INFLATE_BRAIN'
0043 set(H.freesurfer_right_inflate_edit, 'String', p.FS_right_infl_file);
0044 
0045 % 'FS_LEFT_CURVATURE'
0046 set(H.freesurfer_left_curv_edit, 'String', p.FS_left_curv_file);
0047 
0048 % 'FS_RIGHT_CURVATURE'
0049 set(H.freesurfer_right_curv_edit, 'String', p.FS_right_curv_file);
0050 
0051 % 'FS_LEFT_CORTEX_LABEL'
0052 set(H.freesurfer_left_label_edit, 'String', p.FS_left_label_file);
0053 
0054 % 'FS_RIGHT_CORTEX_LABEL'
0055 set(H.freesurfer_right_label_edit, 'String', p.FS_right_label_file);
0056 
0057 % 'FS_LEFT_SPHERE_FILE'
0058 set(H.freesurfer_left_sphere_edit, 'String', p.FS_left_sphere_file);
0059 
0060 % 'FS_RIGHT_SPHERE_FILE'
0061 set(H.freesurfer_right_sphere_edit, 'String', p.FS_right_sphere_file);

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005