Commit 5722144c authored by Jean-Yves TINEVEZ's avatar Jean-Yves TINEVEZ
Browse files

sort_polygon also returns the sorting indices.

parent d237e9bf
......@@ -90,6 +90,7 @@ classdef deproj
% Add the tissue plot colored with the error on cell perimeter caused by the projection.
hts = add_plot_distorsion_perimeter( obj, ax )
end
......@@ -123,7 +124,7 @@ classdef deproj
[ curvMean, curvGauss, curvK1, curvK2 ] = compute_curvatures( H, object_scale, pixel_size, voxel_depth, invert_z )
% Sort the points of a polygon in clockwise manner.
P2 = sort_polygon( P )
[ P2, I ] = sort_polygon( P )
% Sort x,y coordinates along a continuous contour.
P2 = find_countour( P )
......
function P2 = sort_polygon( P )
function [ P2, sort_indexes ] = sort_polygon( P )
%SORT_POLYGON Sort the points of a polygon in clockwise manner.
center = mean( P );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment