GetBitmapCount Example for Delphi

Procedure TForm1.TestFunc();
var
   nCount: Integer;
begin
   nCount:= LEADDicomDS1.GetBitmapCount ();
   if(nCount = 1)then
   begin
      //get the bitmap
      LEADDicomDS1.GetBitmapValue (0, 0, ORDER_RGB, 0);
      LEADRasterView1.Raster.Bitmap:= LEADDicomDS1.Bitmap;
      LEADDicomDS1.Bitmap:= 0; //free the image
   end
   else
   begin
      if(nCount > 1)then
      begin
         //get the bitmap list
         LEADDicomDS1.GetBitmapListValue(0, nCount, 0, ORDER_RGB, 0);
         LEADRasterView1.Raster.BitmapList:= LEADDicomDS1.BitmapList;
         ShowMessage('There are ' + IntToStr(LEADDicomDS1.BitmapListCount) + ' Images');
         LEADDicomDS1.BitmapList:= 0; //free the image
         //play the animation
         LEADRasterView1.AnimationLoop:= True;
         LEADRasterView1.AnimationEnable:= True;
      end
      else
         ShowMessage('No Image!');
   end;
   ShowMessage('wait');
end;