function [zeroAngle] = defineAngles
        
 % show warped image 
    ad =getappdata(0, 'SectorWarpingToolData');
    yvals = ad.mean_shape(:,2);
    minx = find(yvals == min(yvals));
    maxx = find(yvals == max(yvals));
    zeroAngle = atand((ad.mean_shape(maxx,1)-ad.mean_shape(minx,1))/(ad.mean_shape(maxx,2)-ad.mean_shape(minx,2)));
% figure, plot(ad.mean_shape(:,2), ad.mean_shape(:,1)); hold on;
% plot(ad.mean_shape(minx,2), ad.mean_shape(minx,1), 'Marker', 'o'); hold on;
% plot(ad.mean_shape(maxx,2), ad.mean_shape(maxx,1), 'Marker', 'o'); hold on;
return
end
