LoadUseViewPerspective example for Visual Basic

Note: This topic is for Document/Medical only.

This example times the loading of a bitmap with and without changing the internal view perspective.

Dim RasterIO As New LEADRasterIO
'Declare local variables
Dim StartTime, DeltaTime
'Do not include paints when measuring time.
LEADRasterView1.AutoRepaint = False
'Time the load using the bitmap's view perspective.
RasterIO.LoadUseViewPerspective = True
StartTime = Now
RasterIO.Load LEADRasterView1.Raster, "d:\temp\rotated.tif", 0, 0, 1
DeltaTime = DateDiff("s", StartTime, Now)
MsgBox Str$(DeltaTime) + " seconds loaded as is"
'Time the load that converts the bitmap's view perspective.
RasterIO.LoadUseViewPerspective = False
StartTime = Now
RasterIO.Load LEADRasterView1.Raster, "d:\temp\rotated.tif", 0, 0, 1
DeltaTime = DateDiff("s", StartTime, Now)
MsgBox Str$(DeltaTime) + " seconds converted on load"