add_plot_id.m 519 Bytes
Newer Older
1
function hts = add_plot_id( obj, ax )
2
3
%ADD_PLOT_ID Add the epicell ids to the specified plot axes.

4
    epicells = obj.epicells;
5
6
7
8
    n_objects = numel( epicells );
    hts = NaN( n_objects, 1 );
    
    for i = 1 :  n_objects
9
        o = epicells( i );
Jean-Yves TINEVEZ's avatar
Jean-Yves TINEVEZ committed
10
        center = double( o.center );
11
        hts(i ) = text( ax,  ...
Jean-Yves TINEVEZ's avatar
Jean-Yves TINEVEZ committed
12
            center(1), center(2), center(3) + 0.5, ...
13
            num2str( o.id ), ...
14
15
16
17
18
            'HorizontalAlignment', 'center', ...
            'VerticalAlignment', 'middle' );
    end
end