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
a6404512
Commit
a6404512
authored
Jul 27, 2020
by
Jean-Yves TINEVEZ
Browse files
Add and plot the n_neighbors metric.
parent
079601d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/@deproj/deproj.m
View file @
a6404512
...
...
@@ -51,6 +51,9 @@ classdef deproj
% Figure with the error on uncorrected cells area and perimeter.
[
hf
,
ax1
,
ax2
]
=
figure_distorsions
(
obj
,
scale_bar_length
)
% Figure with the number of neighbors around each cell.
[
hf
,
ax
]
=
figure_topology
(
obj
,
scale_bar_length
)
%% Helpers.
% They are public in case of.
...
...
src/@deproj/figure_topology.m
0 → 100644
View file @
a6404512
function
[
hf
,
ax
]
=
figure_topology
(
obj
,
scale_bar_length
)
%FIGURE_TOPOLOGY Figure with the number of neighbors around each cell.
if
nargin
<
2
scale_bar_length
=
10
;
end
hf
=
figure
(
'Position'
,
[
1204
20
600
450
]
);
epicells
=
obj
.
epicells
;
ax
=
gca
;
hold
on
axis
equal
n_neighbors
=
vertcat
(
epicells
.
n_neighbors
);
obj
.
plot_values_junction
(
n_neighbors
,
ax
);
colorbar
obj
.
add_plot_scalebar
(
scale_bar_length
,
ax
);
axis
(
ax
,
'off'
)
title
(
ax
,
'Number of neighbors around a cell'
,
...
'FontWeight'
,
'normal'
,
...
'Interpreter'
,
'none'
)
end
src/@epicell/epicell.m
View file @
a6404512
...
...
@@ -6,6 +6,7 @@ classdef epicell
boundary
center
junction_ids
n_neighbors
area
perimeter
euler_angles
...
...
@@ -39,6 +40,7 @@ classdef epicell
% Base properties.
obj
.
boundary
=
boundary_reduced
;
obj
.
junction_ids
=
junction_ids
;
obj
.
n_neighbors
=
numel
(
junction_ids
);
obj
.
id
=
id
;
obj
.
center
=
mean
(
boundary
);
...
...
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