Home > vbmeg > functions > brain > vb_get_cortex_info.m

vb_get_cortex_info

PURPOSE ^

Make smooth cortex from brain model by morphological smoothing

SYNOPSIS ^

function [Vnew,Fnew,xxnew,Vinfo] = vb_get_cortex_info(V, F, xx, X0)

DESCRIPTION ^

 Make smooth cortex from brain model by morphological smoothing
  [Vnew,Fnew,xxnew,Vinfo] = vb_get_cortex_info(V, F, xx, X0)
--- Input 

 V  : Cortical vertex point cordinate , Analyze_right [mm]
 F  : Patch index structure
 xx : normal
 X0 : left/right center
--- Output 

 Vnew  : Cortical vertex point cordinate     [Nvertex, 3]
 xxnew : Normal vector to cortical surface   [Nvertex, 3]
 Fnew  : Patch index structure
  .F3R    : Right cortex
  .F3L    : Left  cortex
  .F3    : Left + Right
 Vinfo        : Vertex dimension structure
   .Ndipole   : # of vertex
   .NdipoleL  : # of vertex in Left cortex
   .Npatch    : # of patch
   .Coord     = 'Analyze_Right_mm';

 Made by M. Sato 2007/6/15

 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  [Vnew,Fnew,xxnew,Vinfo] = vb_get_cortex_info(V, F, xx, X0)
0002 % Make smooth cortex from brain model by morphological smoothing
0003 %  [Vnew,Fnew,xxnew,Vinfo] = vb_get_cortex_info(V, F, xx, X0)
0004 %--- Input
0005 %
0006 % V  : Cortical vertex point cordinate , Analyze_right [mm]
0007 % F  : Patch index structure
0008 % xx : normal
0009 % X0 : left/right center
0010 %--- Output
0011 %
0012 % Vnew  : Cortical vertex point cordinate     [Nvertex, 3]
0013 % xxnew : Normal vector to cortical surface   [Nvertex, 3]
0014 % Fnew  : Patch index structure
0015 %  .F3R    : Right cortex
0016 %  .F3L    : Left  cortex
0017 %  .F3    : Left + Right
0018 % Vinfo        : Vertex dimension structure
0019 %   .Ndipole   : # of vertex
0020 %   .NdipoleL  : # of vertex in Left cortex
0021 %   .Npatch    : # of patch
0022 %   .Coord     = 'Analyze_Right_mm';
0023 %
0024 % Made by M. Sato 2007/6/15
0025 %
0026 % Copyright (C) 2011, ATR All Rights Reserved.
0027 % License : New BSD License(see VBMEG_LICENSE.txt)
0028 
0029 Ndipole = size(V,1);
0030 
0031 % Find Left/Right cortex
0032 
0033 ixL = find(V(:,1) <= X0(1));
0034 ixR = find(V(:,1) >  X0(1));
0035 
0036 % Left/Right ordering
0037 Vix = [ixL ; ixR ];
0038 Vnew  = V(Vix,:);
0039 xxnew = xx(Vix,:);
0040 
0041 Itrans = zeros(Ndipole,1);
0042 Itrans(Vix) = 1:Ndipole;
0043 
0044 F  = Itrans(F);
0045 NL = length(ixL);
0046 
0047 Fnew.F3L = vb_patch_select([1:NL],F,Ndipole);
0048 Fnew.F3R = vb_patch_select([(NL+1):Ndipole],F,Ndipole);
0049 Fnew.F3  = F;
0050 Fnew.NdipoleL = NL ;
0051 
0052 % Dimensional info
0053 Vinfo.NdipoleL  = NL ;
0054 Vinfo.Ndipole   = Ndipole;
0055 Vinfo.Npatch    = size(F,1);
0056 Vinfo.Coord     = 'Analyze_Right_mm';

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