Adding a DICOM Data Set to a DICOM Directory (Delphi)
// The following code snippet demonstrates how to use the LEADTOOLS DICOM
// DS COM control (TLEADDicomDS) to load a Data Set and then add it to a
// DICOM Directory
// global
LEADDicomDir1: TLEADDicomDir;
LEADDicomDS1: TLEADDicomDS;
begin
// Set the destination folder
LEADDicomDir1.ResetDicomDir ('C:\Medical Images');
// Load a Data Set and add it to the Directory
if(LEADDicomDS1.LoadDS('C:\Medical Images\Image', 0) = DICOM_SUCCESS)then
begin
LEADDicomDir1.InsertDicomDS (LEADDicomDS1.hDicomDS, 'C:\Medical Images\Image');
// Save the DICOMDIR File
LEADDicomDir1.SaveDicomDir ();
end;
end;