area_normalization.m
% We normalize the cortical surface mesh by the surface area
%[vertices,faces] = read_surf(['lh.white']);% lh.white is a native surface mesh generated by freesurfer
%leftSurface.vertices = vertices;
%leftSurface.faces = faces+1;
%[vertices,faces] = read_surf(['rh.white']);
%rightSurface.vertices = vertices;
%rightSurface.faces = faces+1;
surface=leftSurface;
data=ones(size(surface.vertices,1),1);
surface_area = calc_surf_integral(surface,data);
leftSurface.vertices=leftSurface.vertices/sqrt(surface_area);
surface=rightSurface;
data=ones(size(surface.vertices,1),1);
surface_area = calc_surf_integral(surface,data);
rightSurface.vertices=rightSurface.vertices/sqrt(surface_area);