Home > functions > tool_box > mri_toolbox > mri_point_select_dir > display_element > mask_image_element > vb_mask_image_element_new.m

vb_mask_image_element_new

PURPOSE ^

constructor of mask_image_element

SYNOPSIS ^

function [obj] = vb_mask_image_element_new(name, coord_type, B, step)

DESCRIPTION ^

 constructor of mask_image_element
 [USAGE]
    [obj] = vb_mask_image_element_new(<name>, <coord_type>, <B>, <step>);
 [IN]
          name : <<char array>> name of mask_image_element
    coord_type : coordinate type of mask_image_data
             B : mask image data
          step : voxel size[mm]
 [OUT]
    obj : mask_image_element
 [See]
    relative function : vb_display_element_new
 Author: rhayashi
 Created: 2007-07-17

 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 [obj] = vb_mask_image_element_new(name, coord_type, B, step)
0002 % constructor of mask_image_element
0003 % [USAGE]
0004 %    [obj] = vb_mask_image_element_new(<name>, <coord_type>, <B>, <step>);
0005 % [IN]
0006 %          name : <<char array>> name of mask_image_element
0007 %    coord_type : coordinate type of mask_image_data
0008 %             B : mask image data
0009 %          step : voxel size[mm]
0010 % [OUT]
0011 %    obj : mask_image_element
0012 % [See]
0013 %    relative function : vb_display_element_new
0014 % Author: rhayashi
0015 % Created: 2007-07-17
0016 %
0017 % Copyright (C) 2011, ATR All Rights Reserved.
0018 % License : New BSD License(see VBMEG_LICENSE.txt)
0019 
0020 %
0021 % --- Previous check
0022 %
0023 if ~exist('name', 'var'), error('name is a required parameter.'); end
0024 if ~exist('coord_type', 'var')
0025     error('coord_type is a required parameter.');
0026 end
0027 if ~exist('B', 'var'), error('B is a required parameter.'); end
0028 if ~exist('step', 'var'), error('step is a required parameter.'); end
0029 
0030 %
0031 % --- Main Procedure
0032 %
0033 
0034 % Inherit display_element class
0035 obj = vb_display_element_new(name, coord_type);
0036 
0037 % mask_image_element members
0038 obj.class_name = 'mask_image_element';
0039 obj.B = B;
0040 obj.step = step;
0041 
0042 %
0043 % --- After check
0044 %
0045 if nargout ~= 1
0046     error('function caller should receive obj.');
0047 end
0048

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