KeepPixelDataIntact Example for Delphi
var
strMessage: String;
begin
// Load a Data Set
if(LEADDicomDS1.LoadDS ('d:\lead14\dist\images\dicom\Image1.dic', 0) = DICOM_SUCCESS)then
begin
if(LEADDicomDS1.KeepPixelDataIntact = False)then
begin
strMessage:= 'Would you like to keep the pixel data unchanged?' +
Chr(10) + Chr(10) +
'If you choose Yes, then the resulting bitmap data ' +
'will represent exactly what appears inside the ' +
'DICOM file, but may not display properly. If you ' +
'choose No, then the resulting bitmap data may not ' +
'be identical to what appears inside the DICOM file, ' +
'but will display properly.';
if(Application.MessageBox(PChar(strMessage), '', MB_YESNO) = IDYES)then
LEADDicomDS1.KeepPixelDataIntact:= True;
end;
if(LEADDicomDS1.FindFirstElement (TAG_PIXEL_DATA, False) = DICOM_SUCCESS)then
begin
LEADDicomDS1.GetBitmapValue (0, 0, ORDER_BGR, 0);
// ...
end;
end;
end;