function [Sulcal_Depth] = computeSulcalDepth(Mesh_name,Mesh_name_CH,savePath_SulcalDepth)

%==================================================================
% Read the pial surface
%==================================================================
[vertex,face] = read_off(Mesh_name);
vertex=vertex';

%==================================================================
% Read the Convex Hull surface
%==================================================================
[vertex_CH,face_CH]=read_off(Mesh_name_CH);
boundary_pts=vertex_CH';

%==================================================================
%Compute the Sulcal Depth
%==================================================================
Sulcal_Depth=zeros(size(vertex,1),1);
for seed=1:size(vertex,1)
    [closest_dist,~]=min(vecnorm((boundary_pts-vertex(seed,:))'));
    Sulcal_Depth(seed) = closest_dist;  
end
save(savePath_SulcalDepth,'Sulcal_Depth');
