BitonalScaling example for Delphi

This example sets the display to use scale-to-gray and repaints the image. This affects only 1-bit images.

var
   sRet: Smallint;
begin
   if (LEADRasterView1.Raster.IsSupportLocked (L_SUPPORT_DOCUMENT)) then
        ShowMessage ('No scale to gray - You need to unlock Document/Medical capabilities')
   else
   begin
      LEADRasterView1.BitonalScaling:= BITONALSCALING_SCALETOGRAY;
        LEADRasterView1.ForceRepaint (sRet);
   end;
end;