function [T2,N] = CA_A7(T1,white, black) 
%CA_A5 colors remaining tagged articulation cells, which are part of backbone with backbone color

T2=T1;
N=0;
global cmap;
green = length(cmap);
alpha = length(cmap)-2;
beta = length(cmap)-3;
color15 = length(cmap)-15; %the last tag color

for i=1:10000
 for lines=3:size(T1,1)-2
    for columns=2:size(T1,2)-1
        if (T1(lines, columns) == alpha || T1(lines, columns) == green) % if alpha
            if (lines ~= size(T1,1)-1)  
                 if(T1(lines,columns-1) == beta || T1(lines+1,columns) == beta || ...
                         T1(lines-1,columns) == beta || T1(lines,columns+1) == beta)
                     T2(lines, columns)= beta; 
                 end
            end
        end
        N=N+1;
    end
end
    if (norm(T1)==norm(T2)) 
        return; 
    else
%        figure; colormap(cmap); image(T2((2:size(T2,1)-1),(2:size(T2,2)-1))); title('CA\_A7x'); colorbar;  set(gcf,'renderer','OpenGL'); 
       T1=T2; 
    end
end

