Adding a DICOM Data Set to a DICOM Directory for Visual Basic

' 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

Dim DicomDir As New 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) = DICOM_SUCCESS Then
   DicomDir.InsertDicomDS LEADDicomDS.hDicomDS, "C:\Medical Images\Image"

   ' Save the DICOMDIR File
   DicomDir.SaveDicomDir
End If