Absolutepos Example for Visual Basic
'This sample assumes that you have LEADRasterContainerViewer1
'defined somewhere else in your code
Dim raster As New LEADRaster
Dim rasterio As New LEADRasterIO
Dim MedicalSuiteKey As String
MedicalSuiteKey = "" 'Make sure to specify the right key
raster.UnlockSupport L_SUPPORT_MEDICAL, MedicalSuiteKey
' Load IMAGE3.dic from LEAD Technologies setup directory
rasterio.Load raster, "e:\temp\MR.dcm", 0, 0, -1
' Insert a new cell at the end of the container cell queue.
Dim iCellIndex As Long
iCellIndex = LEADRasterContainerViewer1.InsertCell (-1, 0)
' Attach the loaded raster to the newly inserted cell.
LEADRasterContainerViewer1.Cell (iCellIndex).InsertBitmapList raster, True, 0
' Get the cells bounding rectangle.
LEADRasterContainerViewer1.ScaleMode = SCALEMODE_PIXEL
Dim x As Integer
Dim y As Integer
x = LEADRasterContainerViewer1.Cell (iCellIndex).Left
y = LEADRasterContainerViewer1.Cell(iCellIndex).Top
Dim Left As Integer
Dim Top As Integer
Dim Right As Integer
Dim bottom As Integer
Left = x
Top = y
Right = x + LEADRasterContainerViewer1.Cell (iCellIndex).Width
bottom = y + LEADRasterContainerViewer1.Cell(iCellIndex).Height