CreateSample Example for Visual Basic
LEADRasterContainerViewer.EnableMethodErrors = True
Dim MedicalSuiteKey As String
MedicalSuiteKey = "" 'Make sure to specify the right key
Dim raster As New LEADRaster
Dim rasterio As New LEADRasterIO
'Dim rcRect As RECT
'Dim pt As Point
raster.UnlockSupport L_SUPPORT_MEDICAL, MedicalSuiteKey
'Load first image list
rasterio.Load raster, "E:\Temp\XA.dcm", 0, 0, -1
' Insert a new cell at the end of the container cell queue.
Dim iCellIndex As Long
iCellIndex = LEADRasterContainerViewer.InsertCell (-1, 0)
' Attach the loaded raster to the newly inserted cell.
LEADRasterContainerViewer.Cell(iCellIndex).InsertBitmapList raster, True, 0
' Add some tags to the cell
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_TOPLEFT, 0, "Image1 Text 1", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 1, CONVIEW_CELLALIGN_TOPLEFT, 0, "Image1 Text 2", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 2, CONVIEW_CELLALIGN_TOPLEFT, 0, "Image1 Text 3", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 3, CONVIEW_CELLALIGN_TOPLEFT, 0, "Image1 Text 4", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 1, CONVIEW_CELLALIGN_LEFTCENTER, 0, "L", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_BOTTOMLEFT, 0, "Image1 Text 5", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_TOPCENTER, 0, "Top", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_BOTTOMCENTER, 0, "Bottom", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_TOPRIGHT, 0, "Image1 Text 6", 0
LEADRasterContainerViewer.Cell (iCellIndex).AddTag 0, CONVIEW_CELLALIGN_RIGHTCENTER, 0, "R", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 8, CONVIEW_CELLALIGN_TOPLEFT, CONVIEW_CELLTAG_FRAME, 0, 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 3, CONVIEW_CELLALIGN_BOTTOMLEFT, CONVIEW_CELLTAG_WLCENTERWIDTH, 0, 0
'Load second image list
rasterio.Load raster, "E:\Temp\MR.dcm", 0, 0, -1
' insert a new cell at the end of the container queue.
iCellIndex = LEADRasterContainerViewer.InsertCell (-1, 0)
' Attach the loaded bitmap list to the newly inserted cell.
LEADRasterContainerViewer.Cell(iCellIndex).InsertBitmapList raster, True, 0
' Add some tags to the cell
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_TOPLEFT, 0, "Image3 Text 1", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 2, CONVIEW_CELLALIGN_TOPLEFT, 0, "Image3 Text 2", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 4, CONVIEW_CELLALIGN_TOPLEFT, 0, "Image3 Text 3", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 6, CONVIEW_CELLALIGN_TOPLEFT, 0, "Image3 Text 4", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 1, CONVIEW_CELLALIGN_LEFTCENTER, 0, "Image3 Text 5", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_BOTTOMLEFT, 0, "Image3 Text 6", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_TOPCENTER, 0, "Image3 Text 7", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_BOTTOMCENTER, 0, "Image3 Text 8", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_TOPRIGHT, 0, "Image3 Text 9", 0
LEADRasterContainerViewer.Cell(iCellIndex).AddTag 0, CONVIEW_CELLALIGN_RIGHTCENTER, 0, "R", 0
LEADRasterContainerViewer.Cell (iCellIndex).AddTag 7, CONVIEW_CELLALIGN_TOPLEFT, CONVIEW_CELLTAG_SCALE, 0, 0
Dim ContainerViewerProps As New LEADContainerViewerProperties
' Change the number of rows and cols to show all the inserted cells.
ContainerViewerProps.ColumnCount = 2
ContainerViewerProps.RowCount = 1
ContainerViewerProps.IncludedParameters = CONVIEW_CIP_ROWCOUNT Or CONVIEW_CIP_COLUMNCOUNT
LEADRasterContainerViewer.GetContainerProperties ContainerViewerProps, 0
' Change the number of sub-rows and sub-cols of Cell 0.
LEADRasterContainerViewer.Cell(0).SubRowCount = 3
LEADRasterContainerViewer.Cell(0).SubColumnCount = 3
'Add owner action tag.
LEADRasterContainerViewer.Cell (0).AddTag 0, CONVIEW_CELLALIGN_BOTTOMRIGHT, CONVIEW_CELLTAG_OWNERDRAW, 0, 0
'Reposition Cell 0.
LEADRasterContainerViewer.Cell (0).RepositionCell 1