GetTransformationParameters Example for Visual Basic

Dim RasterProc As New LEADRasterProcess
Dim i As Integer

RasterProc.ReferencePointsX(0) = 81400
RasterProc.ReferencePointsY (0) = 11300

RasterProc.ReferencePointsX(1) = 78600
RasterProc.ReferencePointsY(1) = 87400

RasterProc.ReferencePointsX(2) = 79400
RasterProc.ReferencePointsX(2) = 116000

RasterProc.MarksCount = 3

RasterProc.Mark(0).Type = RGS_T
RasterProc.Mark(0).MinScale = 90
RasterProc.Mark(0).MaxScale = 110
RasterProc.Mark(0).Width = 31
RasterProc.Mark(0).Height = 29
RasterProc.Mark(0).Top = 72
RasterProc.Mark(0).Left = 741
RasterProc.Mark(0).Bottom = 171
RasterProc.Mark(0).Right = 896
RasterProc.Mark(0).NumberOfExpectedMarks = 1

RasterProc.Mark(1).Type = RGS_T
RasterProc.Mark(1).MinScale = 90
RasterProc.Mark(1).MaxScale = 110
RasterProc.Mark(1).Width = 31
RasterProc.Mark(1).Height = 29
RasterProc.Mark(1).Top = 836
RasterProc.Mark(1).Left = 706
RasterProc.Mark(0).Bottom = 908
RasterProc.Mark(0).Right = 840
RasterProc.Mark(0).NumberOfExpectedMarks = 1

RasterProc.Mark(2).Type = RGS_T
RasterProc.Mark(2).MinScale = 90
RasterProc.Mark(2).MaxScale = 110
RasterProc.Mark(2).Width = 31
RasterProc.Mark(2).Height = 29
RasterProc.Mark(2).Top = 1118
RasterProc.Mark(2).Left = 729
RasterProc.Mark(2).Bottom = 1199
RasterProc.Mark(2).Right = 852
RasterProc.Mark(2).NumberOfExpectedMarks = 1


RasterProc.SearchRegMarks LEADRasterView1.Raster

For i = 0 To 2
    RasterProc.MarkPointX(i) = RasterProc.Mark(i).DetectedMarkPointX(0)
    RasterProc.MarkPointY (i) = RasterProc.Mark(i).DetectedMarkPointY(0)
Next i '

RasterProc.GetMarksCenterMass LEADRasterView1.Raster
For i = 0 To 2
    RasterProc.TransformedPointsX(i) = RasterProc.MarkCMPointX(i)
    RasterProc.TransformedPointsY(i) = RasterProc.MarkCMPointY(i)
Next i

RasterProc.GetTransformationParameters LEADRasterView1.Raster

RasterProc.ApplyTransformationParameters LEADRasterView1.Raster, _
RasterProc.XTranslation, _
RasterProc.YTranslation, _
RasterProc.TransformationAngle, _
RasterProc.XScale, _
RasterProc.YScale, _
RGS_SIZE_NORMAL Or RGS_SIZE_FAVORWHITE