function GrayToPseColor(converMethod:TGrayColor_SubMeth;grayValue:Integer):TColor;//灰度-伪彩色变换
var
colorR,colorG,colorB:Integer;
begin
if converMethod=GCM_Pseudo1 then
begin
colorR:=Abs(0-grayValue);
colorG:=Abs(127-grayValue);
colorB:=Abs(255-grayValue);
end
else if converMethod=GCM_Pseudo2 then
begin
if ((grayValue>=0) and (grayValue<=63)) then
begin
colorR:=0;
colorG:=0;
colorB:=Round(grayValue/64*255);
end
else if ((grayValue>=64) and (grayValue<=127)) then
begin
colorR:=0;
colorG:=Round((grayValue-64)/64*255);
colorB:=Round((127-grayValue)/64*255);
end
else if ((grayValue>=128) and (grayValue<=191)) then
begin
colorR:=Round((grayValue-128)/64*255);
colorG:=255;
colorB:=0;
end
else if ((grayValue>=192) and (grayValue<=255)) then
begin
colorR:=255;
colorG:=Round((255-grayValue)/64*255);
colorB:=0;
end;
end
else if converMethod=GCM_Metal1 then
begin
if ((grayValue>=0) and (grayValue<=63)) then
begin
colorR:=0;
colorG:=0;
colorB:=Round(grayValue/64*255);
end
else if ((grayValue>=64) and (grayValue<=95)) then
begin
colorR:=Round((grayValue-63)/32*127);
colorG:=Round((grayValue-63)/32*127);
colorB:=255;
end
else if ((grayValue>=96) and (grayValue<=127)) then
begin
colorR:=Round((grayValue-95)/32*127)+128;
colorG:=Round((grayValue-95)/32*127)+128;
colorB:=Round((127-grayValue)/32*255);
end
else if ((grayValue>=128) and (grayValue<=191)) then
begin
colorR:=255;