ApplyVOILUT2 Example for Visual Basic
Function TestVOILUT(ByVal bLinear As Boolean)
Dim i As Integer
Dim Data As Variant
Dim RasterProc As New LEADRasterProcess
Dim LUT(4096) As Long
If (bLinear) Then
RasterProc.ApplyLinearVOILUT LeadRasterView.Raster, 330#, 600#, 0
Else
For i = 0 To 4096
If (i < 30) Then
LUT(i) = 0
Else
If (i > 630) Then
LUT(i) = 630
Else
LUT(i) = i
End If
End If
Next i
Data.VarType = vbLong Or vbArray
Data = LUT
RasterProc.ApplyVOILUT2 LeadRasterView.Raster, Data, 0, 0
End If
End Function