Home > vbmeg > functions > common > morphology > vb_reduce_vertex.m

vb_reduce_vertex

PURPOSE ^

Make new cortex model with reduced resolution

SYNOPSIS ^

function [V, F] = vb_reduce_vertex(V,F,Reduce_ratio)

DESCRIPTION ^

 Make new cortex model with reduced resolution
  [V, F] = vb_reduce_vertex(V,F,Reduce_ratio)
 解像度を下げて皮質点を作成

 Reduce_ratio = 1/Nrate < 1 : 皮質点の数が 1/Nrate になる
              = Nreduce > 1 : 皮質点の数が Nreduce になる

 2005-5-5  by M. Sato

 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 [V, F] = vb_reduce_vertex(V,F,Reduce_ratio)
0002 % Make new cortex model with reduced resolution
0003 %  [V, F] = vb_reduce_vertex(V,F,Reduce_ratio)
0004 % 解像度を下げて皮質点を作成
0005 %
0006 % Reduce_ratio = 1/Nrate < 1 : 皮質点の数が 1/Nrate になる
0007 %              = Nreduce > 1 : 皮質点の数が Nreduce になる
0008 %
0009 % 2005-5-5  by M. Sato
0010 %
0011 % Copyright (C) 2011, ATR All Rights Reserved.
0012 % License : New BSD License(see VBMEG_LICENSE.txt)
0013 
0014 % 頂点座標 V を左右の脳に分ける
0015 Ndipole  = size(V,1);
0016 NdipoleL = F.NdipoleL ;
0017 NdipoleR = Ndipole - NdipoleL ;
0018 
0019 if Reduce_ratio > 1, 
0020     ReduceL = round(NdipoleL*Reduce_ratio*2/Ndipole);
0021     ReduceR = round(NdipoleR*Reduce_ratio*2/Ndipole);
0022 else
0023     ReduceL = Reduce_ratio;
0024     ReduceR = Reduce_ratio;
0025 end;
0026 
0027 V0L = V(1:NdipoleL , :);
0028 V0R = V((NdipoleL+1):Ndipole , :);
0029 F0R = F.F3R    ;
0030 F0L = F.F3L    ;
0031 F0R = F0R - NdipoleL;
0032 
0033 % --- Redeuce patchs
0034 
0035 if NdipoleL > 0,
0036     [F3L,V3L] = vb_reducepatch(F0L,V0L,ReduceL); 
0037 else
0038     F3L = [];
0039     V3L = [];
0040 end
0041 
0042 NdipoleL = size(V3L,1);
0043 
0044 if NdipoleR > 0,
0045     [F3R,V3R] = vb_reducepatch(F0R,V0R,ReduceR);
0046     F3R = F3R + NdipoleL;
0047 else
0048     F3R = [];
0049     V3R = [];
0050 end
0051 
0052 V = [ V3L; V3R ];
0053 
0054 F.F3L       = F3L;
0055 F.F3R       = F3R;
0056 F.F3       = [F3L; F3R];
0057 F.NdipoleL = NdipoleL;

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005