Home > functions > gui > project_mgr_dir > project_mgr_uimenu_tool_callback.m

project_mgr_uimenu_tool_callback

PURPOSE ^

callback function for uimenu 'Tools'.

SYNOPSIS ^

function project_mgr_uimenu_tool_callback(fig, hObj)

DESCRIPTION ^

 callback function for uimenu 'Tools'.
 [USAGE]
    project_mgr_uimenu_tool_callback(<fig>, <hObj>);
 [IN]
     fig : figure handle of project_mgr gui.
    hObj : event component handle.
 [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 project_mgr_uimenu_tool_callback(fig, hObj)
0002 % callback function for uimenu 'Tools'.
0003 % [USAGE]
0004 %    project_mgr_uimenu_tool_callback(<fig>, <hObj>);
0005 % [IN]
0006 %     fig : figure handle of project_mgr gui.
0007 %    hObj : event component handle.
0008 % [OUT]
0009 %    none
0010 %
0011 % Copyright (C) 2011, ATR All Rights Reserved.
0012 % License : New BSD License(see VBMEG_LICENSE.txt)
0013 
0014 %
0015 % --- Previous check
0016 %
0017 if ~exist('fig', 'var') || isempty(fig) || ~ishandle(fig)
0018     error('invalid figure handle is specified.');
0019 end
0020 if ~exist('hObj', 'var') || isempty(hObj)
0021     error('hObj is a required parameter.');
0022 end
0023 
0024 %
0025 % --- Main Procedure
0026 %
0027 
0028 % load data (@see project_mgr)
0029 data = guidata(fig);
0030 H = data.H; % component handles
0031 proj_root = project_file_mgr('get_project_root');
0032 
0033 switch(hObj)
0034     case H.tool_convert_dicom_nifti
0035         [RAS, LAS] = convert_dicom_nifti;
0036         if ~isempty(LAS)
0037             str = cell(3,1);
0038             str{1} = 'These files are created.';
0039             str{2} = ['LAS Analyze : ' LAS];
0040             str{3} = ['RAS NIfTI   : ' RAS];
0041             msgbox(str, 'DICOM converter');
0042         end
0043         fig_t = -1;
0044     case H.tool_brain_file_maker
0045         obj = brain_file_maker_new(proj_root);
0046         fig_t = brain_file_maker_get_figure_handle(obj);
0047     case H.tool_job_view_cortex
0048         fig_t = tool_launcher('init', 1);
0049     case H.tool_job_select_area
0050         fig_t = tool_launcher('init', 2);
0051     case H.tool_job_edit_area
0052         fig_t = tool_launcher('init', 3);
0053     case H.tool_job_plot_meg
0054         fig_t = tool_launcher('init', 4);
0055     case H.tool_job_plot_currentmap
0056         job_plot_currentmap;
0057         fig_t = -1;
0058 %        fig_t = tool_launcher('init', 5);
0059     case H.tool_job_edit_act;
0060         fig_t = tool_launcher('init', 6);
0061 end
0062 
0063 data.tools_fig = [data.tools_fig; fig_t];
0064 
0065 % save data
0066 guidata(fig, data);

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005