Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control (Delphi)
// The following code snippet demonstrates how to use the LEADTOOLS DICOM
// DS COM control (TLEADDicomDS) to get the Value of the Implementation Class
// UID element of a DICOM Directory.
//global
LEADDicomDir1: TLEADDicomDir;
LEADDicomDS1: TLEADDicomDS;
var
nRetValue: Integer;
begin
// Load a DICOMDIR File
nRetValue:= LEADDicomDir1.LoadDicomDir ('C:\Medical Images\DICOMDIR', DS_LOAD_CLOSE);
if(nRetValue = DICOM_SUCCESS)then
begin
LEADDicomDS1.hDicomDS:= LEADDicomDir1.hDicomDirDS;
nRetValue:= LEADDicomDS1.FindFirstElement (TAG_IMPLEMENTATION_CLASS_UID, False);
if(nRetValue = DICOM_SUCCESS)then
begin
LEADDicomDS1.GetConvertValue ();
// Display the value of the element
ShowMessage(LEADDicomDS1.StringValues [0]);
LEADDicomDS1.StringValueCount:= 0;
end;
end;
end;