Getting palette color LUT data and attributes Example for Delphi
// 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
var
LUTData: OleVariant;
// Object that will hold Palette Color LUT attributes
PaletteColorLUTAttributes: LPaletteColorLUTAttributes;
nRet: Integer;
begin
// Get 'Palette Color Lookup Table' attributes
nRet:= LEADDicomDS1.GetPaletteColorLUTAttributes (0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
PaletteColorLUTAttributes:= LEADDicomDS1.PaletteColorLUTAttributes;
// Retrieve 'Red Palette Color Lookup Table Data'
// This function will automatically decode the LUT data
// if it was segmented
nRet:= LEADDicomDS1.GetPaletteColorLUTData (LUTData, DICOM_PALETTE_COLOR_LUT_TYPE_RED, 0);
//do something with vData
//...
end;