IMcDisplayDisplayLUT Property |
![]() |
Namespace: MediaCy.IQL.Display.Viewer
Option Explicit Private Function uLoadExampleImage(Optional strImage As String = "BoneBig.jpg") As Boolean If MsgBox("Open example image?", vbYesNo) = vbYes Then Images.Open Path + "Images\" + strImage End If 'user wants to open an example image 'Else leave the ActiveImage alone If ActiveImage Is Nothing Then MsgBox "There is no ActiveImage, so the example cannot run." End If uLoadExampleImage = ActiveImage Is Nothing End Function 'uLoadExampleImage Sub DifferentDisplayLutsInTwoWindows() uLoadExampleImage "GrayBlk.tif" ActiveWindow.Position = Array(10, 30) Dim VD1 As McDisplay, VD2 As McDisplay Set VD1 = ActiveWindow.View.Display With VD1 .EnableResponseLUT = True .EnableDisplayLUT = False .DisplayLUT = Empty End With Windows.Add ActiveWindow.Position = Array(400, 30) Set VD2 = ActiveWindow.View.Display 'Set LUT's to defaults With VD2 .EnableResponseLUT = True .EnableDisplayLUT = False .DisplayLUT = Empty End With 'Invert Luminace With ActiveImage.LookupTables .Item(0).Inverse = True .Realize MsgBox "Both windows should show inverted." VD1.EnableResponseLUT = False 'turn off Window 1 LookupTable MsgBox "Only window 2 should show inverted." Dim dupLUTs As McLookupTables Set dupLUTs = .Duplicate .Reset mclrmAll 'reset the LUT's, but not the duplicate VD1.EnableResponseLUT = True VD1.EnableDisplayLUT = True 'takes precedence over EnableResponseLUT VD1.DisplayLUT = dupLUTs 'Assign inverted LUT's to window 1 DisplayLUT MsgBox "Only window 1 should show inverted." ' create a new pseudo-color Dim pscNew As New McPseudoColor pscNew.Size = 256 pscNew.IntensityRange = Array(50, 200) 'only color part of the range pscNew.ColorSpectrum = mccsRed pscNew.Visible = True VD2.EnableResponseLUT = False 'don't combine with LookupTable VD2.DisplayLUT = pscNew 'Assign pseudo color to window 2 DisplayLUT VD2.EnableDisplayLUT = True 'now show the pseudo color MsgBox "Window 2 should now show pseudocolored without inverted top and bottom." VD2.EnableResponseLUT = True 'turn on combining of PseudoColor with LookupTable .Item(0).Inverse = True 'make LookupTable inverted VD2.DisplayLUT = pscNew 'Assign pseudo color to window 2 DisplayLUT MsgBox "Window 2 should now show pseudocolored WITH inverted top and bottom." VD1.EnableDisplayLUT = False VD2.EnableDisplayLUT = False .Reset mclrmAll 'reset the LUT's MsgBox "Both windows should now show normally. Both will close on OK." End With ActiveImage.Close 'close both windows End Sub 'DifferentDisplayLutsInTwoWindows