function [parent] = makemaprgb(parent,k)
tri_bil=parent.score;
nrows=size(parent.data.image,1);
[IDX,C,~,D]=kmeans(tri_bil,k,'Maxiter',200,'replicates',10,'Distance','cityblock');
clustmap=reshape(IDX,nrows,[]);
parent.map.indices=IDX;
parent.map.map=clustmap;
parent.map.centroids=C;
parent.map.distances=D;
rIDX=mat2gray(clustmap);
scrsz = get(groot,'ScreenSize');
figure('Name','Classification Mapping','Position',[1 1 scrsz(3)*0.7 scrsz(4)]);
subplot(2,2,1:2), imshow(rIDX);
colormap(jet);
str = sprintf('Cluster Map, sRGB; k = %d',k);
title(str);
subplot(2,2,3), scatter(tri_bil(1:100:end,2),tri_bil(1:100:end,3),12,IDX(1:100:end),'filled');
xlabel('g')
ylabel('b')
xlim([-Inf Inf]);
ylim([-Inf Inf]);
colormap(jet);
colorbar;
str = sprintf('Cluster Plot, sRGB, k=%d',k);
title(str)
subplot(2,2,4), 
[s,~]=silhouette(tri_bil(1:200:end,:),IDX(1:200:end));
str = sprintf('Silhouette, sRGB, k=%d',k);
title(str)
parent.sil=s;
end