InsertBitmapListValue Example for Visual Basic
Private Sub TestProcInsertList()
Dim nRet As Integer
Dim IO As New LEADRasterIO
Dim Process As New LEADRasterProcess
LEADDICOM1.EnableMethodErrors = False
'move to the first image element and delete what's there
nRet = LEADDICOM1.FindFirstElement (TAG_PIXEL_DATA, False)
nRet = LEADDICOM1.DeleteElement()
nRet = LEADDICOM1.InsertElement (False, TAG_PIXEL_DATA, VR_OB, False, 0)
'load an image
IO.Load LEADRasterView1.Raster, "d:\lead14\dist\images\image1.cmp", 0, 1, 1
MsgBox "Image loaded from File - Wait"
'create a bitmap list
LEADRasterView2.Raster.InsertBitmapListItem 0, LEADRasterView1.Raster.Bitmap
Process.Flip LEADRasterView1.Raster
LEADRasterView2.Raster.InsertBitmapListItem 1, LEADRasterView1.Raster.Bitmap
Process.Reverse LEADRasterView1.Raster
LEADRasterView2.Raster.InsertBitmapListItem 2, LEADRasterView1.Raster.Bitmap
'insert the image list into the element
nRet = LEADDICOM1.InsertBitmapListValue(LEADRasterView2.Raster.BitmapList, 0, DICOM_IMAGE_COMPRESSION_NONE, DICOM_IMAGE_PHOTOMETRIC_RGB, 0, 0, 0)
If (nRet <> 0) Then
MsgBox "Error"
Exit Sub
End If
MsgBox "ImageList inserted into Data Set - Wait"
End Sub