1 %>@ingroup graphicsapi conversion classlabelsgroup
3 %>@brief Generates a colormap from an integer vector of classes.
5 %> The vector may also have
"refuses" and outlier indicators (-1, -2, -3, ...). These negative values will be marked
as
8 %> @param y integer vector of classes
9 %> @param flag_skip Whether to skip the non-existent indexes. If FALSE, colormap will be filled with grays
13 if nargin < 2 || isempty(flag_skip)
17 u1 = unique(y(y < 0));
18 u2 = unique(y(y >= 0));
25 for class = min(u1):-1
26 if sum(u1 == class) > 0
27 cm(i, :) = [1, 1, 1]*0;
31 cm(i, :) = [1, 1, 1]*.5;
39 if sum(u2 == class) > 0
45 cm(i, :) = [1, 1, 1]*.5;
function classes2colormap(in y, in flag_skip)
function find_color(in i)
Analysis Session (AS) base class.