create bm_process_parm object [USAGE] [obj] = bm_process_parm_create(<parm_type>); [IN] parm_type : concreate parameter type [OUT] obj : concrete parameter object Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [obj] = bm_process_parm_create_parameter(parm_type) 0002 % create bm_process_parm object 0003 % [USAGE] 0004 % [obj] = bm_process_parm_create(<parm_type>); 0005 % [IN] 0006 % parm_type : concreate parameter type 0007 % [OUT] 0008 % obj : concrete parameter object 0009 % 0010 % Copyright (C) 2011, ATR All Rights Reserved. 0011 % License : New BSD License(see VBMEG_LICENSE.txt) 0012 0013 % 0014 % --- Previous check 0015 % 0016 if ~exist('parm_type', 'var') 0017 error('parm_type is a required parameter.'); 0018 end 0019 0020 % 0021 % --- Main Procedure 0022 % 0023 const = define_bm_edit_app; 0024 0025 switch(parm_type) 0026 case const.parm_type.SURF_SMOOTH_PARM 0027 obj = surf_smooth_parm_new; 0028 case const.parm_type.SURF_SMOOTH_EXPAND_PARM 0029 obj = surf_smooth_expand_parm_new; 0030 case const.parm_type.SURF_TO_FILLED_MASK_PARM 0031 obj = surf_to_filled_mask_parm_new; 0032 case const.parm_type.SEPARATE_SURF_PARM 0033 obj = separate_surf_parm_new; 0034 case const.parm_type.COMBINE_SURF_PARM 0035 obj = combine_surf_parm_new; 0036 case const.parm_type.CLOSE_SURF_PARM 0037 obj = close_surf_parm_new; 0038 case const.parm_type.MORPHOLOGY_OPERATION_PARM 0039 obj = morphology_operation_parm_new; 0040 case const.parm_type.SURF_EXTRACT_PARM 0041 obj = surf_extract_parm_new; 0042 end 0043 0044 % 0045 % --- After check 0046 % 0047 if nargout ~= 1 0048 error('function caller should receive obj.'); 0049 end