Getting an overlay bitmap list Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
//This example uses the predefined variable “LEADRasterView1” of type “AxLEADRasterView” from “"LEADTOOLS Toolkit”.
private void GettingOverlayBitmapList()
{
   short iRet = 0;
   LTRASTERPROCLib.LEADOverlayAttributes OverlayAttributesDS = null;
   int GroupNumber = 0;
   bool bIsOverlayInDataSet = false;
   string cs = null;
   iRet = LEADDICOM1.GetOverlayAttributes(0, 0);
   if (iRet != 0)
   {
      MessageBox.Show("error");
      return;
   }
   OverlayAttributesDS = LEADDICOM1.OverlayAttributes;
   cs = LEADDICOM1.get_OverlayActivationLayer(0);
   MessageBox.Show(cs);
   iRet = LEADDICOM1.GetOverlayBitmapList(0, 0, OverlayAttributesDS.NumberFramesInOverlay, 0);
   if (iRet != 0)
   {
      MessageBox.Show("error");
      return;
   }
   LEADRasterView1.Raster.BitmapList = LEADDICOM1.OverlayBitmapList;
}