Getting modality LUT data and attributes Example for Delphi
// This example will retrieve the LUT Data (0028,3006)
// under the Modality LUT Sequence (0028,3000)
var
nRet: Integer;
// Object that will hold modality LUT attributes
MLUTAttributes: LModalityLUTAttributes;
Data: OleVariant;
begin
// Get modality LUT attributes
nRet:= LEADDicomDS1.GetModalityLUTAttributes(0);
if(nRet <> 0)then
begin
ShowMessage('error');
Exit;
end;
MLUTAttributes:= LEADDicomDS1.ModalityLUTAttributes;
// If there is no modality LUT sequence then there is no data !
if (MLUTAttributes.IsModalityLUTSequence = False)then
begin
ShowMessage('No LUT');
Exit;
end;
// Retrieve the LUT Data (0028,3006)
LEADDicomDS1.GetModalityLUTData(Data, 0);
// Do something with the data
end;