Getting modality LUT data and attributes Example for Visual Basic
' This example will retrieve the LUT Data (0028,3006)
' under the Modality LUT Sequence (0028,3000)
Dim Ret As Integer
' Object that will hold modality LUT attributes
Dim MLUTAttributes As LModalityLUTAttributes
' Get modality LUT attributes
Ret = LEADDICOM1.GetModalityLUTAttributes(0)
If (Ret <> 0) Then
MsgBox ("error")
Exit Sub
End If
Set MLUTAttributes = LEADDICOM1.ModalityLUTAttributes
' If there is no modality LUT sequence then there is no data !
If (MLUTAttributes.IsModalityLUTSequence = False) Then
MsgBox ("No LUT")
Exit Sub
End If
Dim Data As Variant
' Retrieve the LUT Data (0028,3006)
LEADDICOM1.GetModalityLUTData Data, 0
' Do something with the data