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

Add and plot the n_neighbors metric.

parent 079601d2
......@@ -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.
......
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
......@@ -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 );
......
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