FindFirstElement Example for Visual Basic
Private Sub TestProc()
'Find the first image element and display it
LEADDICOM1.EnableMethodErrors = True
On Error GoTo MOVEELEMENTERROR
'move to first element in Data Set
LEADDICOM1.MoveFirstElement False
LEADDICOM1.FindFirstElement TAG_PIXEL_DATA, False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name
'find each image
While (True)
LEADDICOM1.FindNextElement False
LEADDICOM1.GetBitmapValue 0, 0, ORDER_RGB, 0
LEADRasterView1.Raster.Bitmap = LEADDICOM1.Bitmap
LEADDICOM1.Bitmap = 0
LEADDICOM1.FindTag LEADDICOM1.CurrentElement.Tag
MsgBox "Element: " & LEADDICOM1.CurrentTag.Name
Wend
MOVEELEMENTERROR:
MsgBox "No More Images"
End Sub