Home > functions > brain > vb_remove_corpus_run.m

vb_remove_corpus_run

PURPOSE ^

Remove corpus region from cortex model

SYNOPSIS ^

function [Vindx, Iremove] = vb_remove_corpus_run(brainfile,Para)

DESCRIPTION ^

  Remove corpus region from cortex model
  [Vindx, Iremove] = vb_remove_corpus_run(brainfile)

 Vindx   : Vertex index for cortex model after removing central region
 Iremove : Removed vertex index in central region

 Option input
 Para.Dmax_tri    : Max distance to find large triangle in corpus callosal
 Para.Rmax_remove : Max radius to extend remove region
 Para.Rerosion    : Radius for single erosion

 2005-3-28  by M. Sato

 背景活動用に左右脳の脳梁付近の頂点を削除した頂点インデックスを求める

 処理の内容
 1.まず始めに Dmax よりも大きな長さを持つ三角形を選ぶ
     これで中心付近の脳梁部分に対応した頂点を選ぶ
 
 2.Rmaxは最初に選んだ領域からどの程度領域を拡大させるかを決める半径
     皮質に沿った距離は16mm程度しか計算していないので、
     Rmaxになるまでエロージョンを繰り返す。
     Rstepは1回のエロージョンに使用する半径。

 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    [Vindx, Iremove] = vb_remove_corpus_run(brainfile,Para)
0002 %  Remove corpus region from cortex model
0003 %  [Vindx, Iremove] = vb_remove_corpus_run(brainfile)
0004 %
0005 % Vindx   : Vertex index for cortex model after removing central region
0006 % Iremove : Removed vertex index in central region
0007 %
0008 % Option input
0009 % Para.Dmax_tri    : Max distance to find large triangle in corpus callosal
0010 % Para.Rmax_remove : Max radius to extend remove region
0011 % Para.Rerosion    : Radius for single erosion
0012 %
0013 % 2005-3-28  by M. Sato
0014 %
0015 % 背景活動用に左右脳の脳梁付近の頂点を削除した頂点インデックスを求める
0016 %
0017 % 処理の内容
0018 % 1.まず始めに Dmax よりも大きな長さを持つ三角形を選ぶ
0019 %     これで中心付近の脳梁部分に対応した頂点を選ぶ
0020 %
0021 % 2.Rmaxは最初に選んだ領域からどの程度領域を拡大させるかを決める半径
0022 %     皮質に沿った距離は16mm程度しか計算していないので、
0023 %     Rmaxになるまでエロージョンを繰り返す。
0024 %     Rstepは1回のエロージョンに使用する半径。
0025 %
0026 % Copyright (C) 2011, ATR All Rights Reserved.
0027 % License : New BSD License(see VBMEG_LICENSE.txt)
0028 
0029 if ~exist('brainfile','var')
0030     bayes_parm = set_bayes_parm_hand;
0031     brainfile = bayes_parm.brainfile;
0032 end
0033 
0034 %
0035 % ----- Default Corpus Remove Parameter
0036 %
0037 if ~exist('Para','var') | ~isfield(Para,'Dmax_tri')
0038     % Max distance to find large triangle in corpus callosal
0039     Dmax_tri     = 0.02 ;
0040 else
0041     Dmax_tri     = Para.Dmax_tri;
0042 end    
0043 if ~exist('Para','var') | ~isfield(Para,'Rmax_remove')
0044     % Max radius to extend remove region
0045     Rmax_remove  = 0.030;
0046 else
0047     Rmax_remove  = Para.Rmax_remove;
0048 end
0049 if ~exist('Para','var') | ~isfield(Para,'Rerosion')
0050     % Radius for single erosion
0051     % erosion is repeated (Rmax/Rstep) times
0052     Rerosion     = 0.006;
0053 else
0054     Rerosion     = Para.Rerosion;
0055 end
0056 if ~exist('Para','var') | ~isfield(Para,'Plot_mode')
0057     Plot_mode = 0;
0058 else
0059     Plot_mode = Para.Plot_mode;
0060 end
0061 %
0062 % ----- Remove corpus
0063 [V, F] = vb_load_cortex(brainfile);
0064 [nextDD,nextIX] = vb_load_cortex_neighbour(brainfile);
0065 
0066 [Vindx, Iremove] = vb_remove_corpus(F,V,nextIX,nextDD, ...
0067                                  Rmax_remove, Rerosion, Dmax_tri);
0068 
0069 if Plot_mode == 1,
0070     vb_plot_corpus( V,F,Iremove,Vindx );
0071 end
0072 
0073 return

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