Getting palette color LUT data and attributes Example for Visual Basic
' This example will retrieve the data under
' "Red Palette Color Lookup Table Data"(0028,1201)
' element and if the data is segmented it will get the data under
' "Segmented Red Palette Color Lookup Table Data" (0028,1221) and decode it
Dim LUTData As Variant
' Object that will hold Palette Color LUT attributes
Dim PaletteColorLUTAttributes As LPaletteColorLUTAttributes
Dim iRet As Integer
' Get "Palette Color Lookup Table" attributes
iRet = LEADDICOM1.GetPaletteColorLUTAttributes (0)
If (iRet <> 0) Then
MsgBox ("error")
Exit Sub
End If
Set PaletteColorLUTAttributes = LEADDICOM1.PaletteColorLUTAttributes
' Retrieve "Red Palette Color Lookup Table Data"
' This function will automatically decode the LUT data
' if it was segmented
iRet = LEADDICOM1.GetPaletteColorLUTData (LUTData, DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0)
'do something with vData
'...