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

plot_values_junction: plot the tissue using the junction graph.

parent 326f2f0b
......@@ -28,8 +28,8 @@ classdef deproj
%% Conversion between MATLAB objects.
% Returns the faces and vertices of a deproj collection.
[ V, F ] = to_vertices_and_faces( obj )
% Returns the faces and vertices of the junction graph of a instance.
[ V, F ] = graph_to_VF( obj )
% Returns the cells boundary polygons as 3 matrices padded by NaNs.
[ X, Y, Z ] = to_matrices( obj )
......@@ -66,6 +66,10 @@ classdef deproj
% Plot the tissue with cells as ellipses, colored by the specified values.
hts = plot_values_ellipse( obj, values, ax )
% Plot the tissue with the cell contour approximated by the junctions, colored by the specified values.
hts = plot_values_junction( obj, values, ax )
end
%% Public static methods: builders & util.
......
function hts = plot_values_junction( obj, values, ax )
%PLOT_VALUES_JUNCTION Plot the tissue with the cell contour approximated by the junctions, colored by the specified values.
[ V, F ] = obj.graph_to_VF();
n_objects = numel( obj.epicells );
if n_objects > 1000, lw = 1; else, lw = 2; end
hts = patch( ...
'Faces', F, ...
'Vertices', V, ...
'FaceVertexCData', values, ...
'FaceColor', 'flat', ...
'LineWidth', lw, ...
'Parent', ax );
end
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