ApplyModalityLUT2 Example for Visual Basic
Function TestModalityLUT(ByVal bLinear As Boolean)
Dim i As Integer
Dim Data As Variant
Dim RasterProc As New LEADRasterProcess
Dim LUT(65536) As Long
If (bLinear) Then
RasterProc.ApplyModalityLUT2 LeadRasterView.Raster, 0, 0.5, 0
Else
For i = 0 To 65535
LUT(i) = i / 2
Next i
Data.VarType = vbLong Or vbArray
Data = LUT
RasterProc.ApplyModalityLUT2 LeadRasterView.Raster, Data, 0, 0
End If
End Function