create mask_image_data object [USAGE] [obj] = mask_image_data_new( <B>, <step>, <coord_type>[,model_name][,conductivity]); [IN] B : mask image data step : voxel size[mm] coord_type : coordinate type of mask_image_data model_name : model name of mask_image_data conductivity : conductivity value [OUT] obj : mask_image_data object Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [obj] = ... 0002 mask_image_data_new(B, step, coord_type, model_name, conductivity) 0003 % create mask_image_data object 0004 % [USAGE] 0005 % [obj] = mask_image_data_new( 0006 % <B>, <step>, <coord_type>[,model_name][,conductivity]); 0007 % [IN] 0008 % B : mask image data 0009 % step : voxel size[mm] 0010 % coord_type : coordinate type of mask_image_data 0011 % model_name : model name of mask_image_data 0012 % conductivity : conductivity value 0013 % 0014 % [OUT] 0015 % obj : mask_image_data object 0016 % 0017 % Copyright (C) 2011, ATR All Rights Reserved. 0018 % License : New BSD License(see VBMEG_LICENSE.txt) 0019 0020 const = define_bm_edit_app; 0021 0022 % 0023 % --- Previous check 0024 % 0025 if ~exist('B', 'var'), error('B is a required parameter.'); end 0026 if ~exist('step', 'var'), error('step is a required parameter.'); end 0027 if ~exist('coord_type', 'var') 0028 error('coord_type is a required parameter.'); 0029 end 0030 if ~exist('model_name', 'var') || isempty(model_name) 0031 model_name = 'mask image data'; 0032 end 0033 if ~exist('conductivity') || isempty(conductivity) 0034 conductivity = const.DEFAULT_CONDUCTIVITY; 0035 end 0036 0037 % 0038 % --- Inheritance 0039 % 0040 obj = brain_data_new(coord_type, model_name, conductivity); 0041 0042 % set class type 0043 obj.class_type = 'mask_image_data'; 0044 0045 % 0046 % --- Member initialize 0047 % 0048 obj.B = B; 0049 obj.step = step; 0050 0051 % 0052 % --- After check 0053 % 0054 if nargout ~= 1 0055 error('function caller should receive obj.'); 0056 end