Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IAH public
DeProj
Commits
5722144c
Commit
5722144c
authored
Jul 26, 2020
by
Jean-Yves TINEVEZ
Browse files
sort_polygon also returns the sorting indices.
parent
d237e9bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/@deproj/deproj.m
View file @
5722144c
...
...
@@ -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
)
...
...
src/@deproj/sort_polygon.m
View file @
5722144c
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment