DeleteBitmapValue Example for VB.NET
'LEADDICOM1 is a DICOM Dataset defined outside this method
'This example uses the predefined variable "LEADRasterView1" of type AxLEADRasterView" from "LEADTOOLS Toolkit".
Private Sub TestDeleteBitmapValue()
Dim nRet As Short
Dim Process As New LTRASTERPROCLib.LEADRasterProcess
LEADDICOM1.EnableMethodErrors = False
'move to the first image element
nRet = LEADDICOM1.FindFirstElement(LTDICLib.DicomDataSetTagConstants9.TAG_PIXEL_DATA, False)
'get the first image
nRet = LEADDICOM1.GetBitmapValue(0, 0, 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, LTDICLib.DicomImageCompressionConstants.DICOM_IMAGE_COMPRESSION_NONE, LTDICLib.DicomImagePhotometricConstants.DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)
End Sub