Adding a DICOM Data Set to a DICOM Directory for C#
//LEADDicomDS is a DICOM Dataset defined outside this method
private void AddingDICOMDataSetToDICOMDirectory()
{
// The following code snippet demonstrates how to use
the LEADTOOLS DICOM
// DS COM Object (ILEADDicomDS) to load a Data Set and
then add it to a
// DICOM Directory
LTDICDIRLib.LEADDicomDir DicomDir = new LTDICDIRLib.LEADDicomDir();
// Set the destination folder DicomDir.ResetDicomDir("C:\\Medical
Images");
// Load a Data Set and add it to the Directory
if (LEADDicomDS.LoadDS("C:\\Medical
Images\\Image", 0) == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
{
DicomDir.InsertDicomDS(LEADDicomDS.hDicomDS, "C:\\Medical
Images\\Image");
// Save the DICOMDIR File DicomDir.SaveDicomDir();
}
}