Home > functions > gui > bm_editor > bm_processor > bm_processor_separate_surf.m

bm_processor_separate_surf

PURPOSE ^

processing by vb_separate_surf()

SYNOPSIS ^

function [new_model_cell] = bm_processor_separate_surf(obj, brain_data, parm)

DESCRIPTION ^

 processing by vb_separate_surf()
 [USAGE]
     [new_model_cell] =
         bm_processor_separate_surf(<obj>, <brain_data>, <parm>);
 [IN]
           obj : bm_processor object
    brain_data : processing data
          parm : processing parameter
 [OUT]
    new_model_cell : cell of processed brain_data object.

 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 [new_model_cell] = bm_processor_separate_surf(obj, brain_data, parm)
0002 % processing by vb_separate_surf()
0003 % [USAGE]
0004 %     [new_model_cell] =
0005 %         bm_processor_separate_surf(<obj>, <brain_data>, <parm>);
0006 % [IN]
0007 %           obj : bm_processor object
0008 %    brain_data : processing data
0009 %          parm : processing parameter
0010 % [OUT]
0011 %    new_model_cell : cell of processed brain_data object.
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
0015 
0016 %
0017 % --- Previous check
0018 %
0019 if ~exist('obj', 'var'), error('obj is a required parameter.'); end
0020 if ~exist('brain_data', 'var')
0021     error('brain_data is a required parameter.');
0022 end
0023 if ~exist('parm', 'var'), error('parm is a required parameter.'); end
0024 
0025 if ~strcmp(brain_data.class_type, 'surf_data')
0026     error('Not surface data was inputted.');
0027 end
0028 
0029 
0030 %
0031 % --- Main Procedure
0032 %
0033 global vbmeg_inst;
0034 const = vbmeg_inst.const;
0035 
0036 % get processing data
0037 V  = surf_data_get_vertex(brain_data);
0038 F  = surf_data_get_face(brain_data);
0039 xx = surf_data_get_normal_vector(brain_data);
0040 
0041 % processing
0042 [Fall, Vall] = vb_separate_surf(F, V, parm.seedID);
0043 
0044 % create new data
0045 Nmodel = length(Fall);
0046 new_model_cell = cell(Nmodel, 1);
0047 for k=1:Nmodel
0048     [xx_k, Fall{k}] = vb_out_normal_vect(Vall{k}, Fall{k});
0049     new_model_cell{k} = surf_data_new(Vall{k}, Fall{k}, xx_k, ...
0050                                 const.COORDINATE_ANALYZE_RIGHT_MM); 
0051 end

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