Skip to content

Commit

Permalink
update bwlabel() to CCL()
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouChuanyou committed Nov 7, 2022
1 parent 85c1582 commit b5b8307
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Paper_Test_Code/Fig16/CCL_display.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
0 1 1 1 0 0;
0 0 0 0 0 0];

[output_im,~] = bwlabel(input_im);
[output_im,~] = CCL(input_im);
ColorMatrix=[0,139,0;255,255,0];
subplot(1,2,1);
vislabels2(input_im,ColorMatrix)
Expand Down
4 changes: 2 additions & 2 deletions Paper_Test_Code/Fig18/LabelCCL_nonconditional_simulation.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
addpath('../../relycode');
load('Theory_MultiTree_Snesim_nonconditon.mat');
% multiple search trees realization CCL
[newlabel1,num1] = bwlabel(Theory_MultiTree_Snesim_nonconditon{1}{1});
[newlabel1,num1] = CCL(Theory_MultiTree_Snesim_nonconditon{1}{1},0);
% original Snesim realizationB CCL
[newlabel2,num2] = bwlabel(Theory_MultiTree_Snesim_nonconditon{1}{2});
[newlabel2,num2] = CCL(Theory_MultiTree_Snesim_nonconditon{1}{2},0);

figure(1);
% Set color mapping matrix
Expand Down
3 changes: 3 additions & 0 deletions relycode/vislabels1.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ function vislabels1(L,ColorMatrix)
hold(axesHandle, 'on');
for k = 1:numel(s)
e = s(k).Extrema;
if k==10 && numel(s)>10 % This is just for channel '10' in subplot2
e(end-1,2) = e(end-1,2)-1; % because mark '10' will hide the sand
end
text(e(end-1,1), e(end-1,2)-1, sprintf('%d', k), ...
'Parent', axesHandle, ...
'Clipping', 'on', ...
Expand Down

0 comments on commit b5b8307

Please sign in to comment.