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

vb_cut_area

PURPOSE ^

Erosion according to surface-distance

SYNOPSIS ^

function Iextract = vb_cut_area(Jarea, R, nextIX, nextDD)

DESCRIPTION ^

 Erosion according to surface-distance
  Iextract = vb_cut_area(Jarea, R, nextIX, nextDD)
 境界から半径 R 以内の近傍点をリストから削除

 Iextract : 新しい頂点リスト
 Jarea    : 頂点リスト
   R      : 探索する近傍点の半径 ( m )

 nextIX{i} : 点-i の近傍点のインデックスリスト
 nextDD{i} : 点-i と近傍点の皮質に沿った距離

 Made by M. Sato 2004-3-28

 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    Iextract = vb_cut_area(Jarea, R, nextIX, nextDD)
0002 % Erosion according to surface-distance
0003 %  Iextract = vb_cut_area(Jarea, R, nextIX, nextDD)
0004 % 境界から半径 R 以内の近傍点をリストから削除
0005 %
0006 % Iextract : 新しい頂点リスト
0007 % Jarea    : 頂点リスト
0008 %   R      : 探索する近傍点の半径 ( m )
0009 %
0010 % nextIX{i} : 点-i の近傍点のインデックスリスト
0011 % nextDD{i} : 点-i と近傍点の皮質に沿った距離
0012 %
0013 % Made by M. Sato 2004-3-28
0014 %
0015 % Copyright (C) 2011, ATR All Rights Reserved.
0016 % License : New BSD License(see VBMEG_LICENSE.txt)
0017 
0018 NV     = size(nextIX,1); % Number of all vertex
0019 NJ     = length(Jarea);
0020 
0021 FLAG = zeros(NV,1);
0022 flag = zeros(NV,1);
0023 
0024 % Internal point flag
0025 FLAG(Jarea) = 1;
0026 flag(Jarea) = 1;
0027 
0028 for n=1:NJ,
0029     i     = Jarea(n);
0030     dd0  = nextDD{i};
0031 
0032     % Find neighbor point within R from internal point
0033     inx  = find( dd0 <= R );
0034     indx = nextIX{i}(inx);
0035 
0036     % Exclude points if R-neighbor include external point
0037     flag(i) = prod(FLAG(indx));
0038 end;
0039 
0040 Iextract = find( flag > 0 );

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