DeleteBitmapValue Example for C#

//This example uses the predefined variable “LEADRasterView1” of type “AxLEADRasterView” from “"LEADTOOLS Toolkit”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteBitmapValue()
{
   short nRet = 0;
   LTRASTERPROCLib.LEADRasterProcess Process = new LTRASTERPROCLib.LEADRasterProcess();
   LEADDICOM1.EnableMethodErrors = false;
   //move to the first image element
   nRet = LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, false);
   //get the first image
   nRet = LEADDICOM1.GetBitmapValue(0, 0, (short)LTDICLib.DicomColorOrderConstants.ORDER_BGR, 0);
   LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap;
   //flip the image
   Process.Flip(LEADRasterView1.Raster);
   //delete the first image from the dataset
   nRet = LEADDICOM1.DeleteBitmapValue(0, 1);
   //now update the list with the flipped image
   nRet = LEADDICOM1.InsertBitmapValue(LEADRasterView1.Raster.Bitmap, 0, (int)LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, (int)LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0);
}