

All files in the destination folder can be added at once by calling DicomDir.InsertFile with the method's parameter set to a null reference (Nothing in VB). Adding the files individually requires multiple calls to the DicomDir.InsertFile method, with the name of the file to add passed to the method. The DICOM files contained in the destination folder can also be added individually or all at once using this method.

Only the DICOM files within the destination folder (e.g., "C:\DICOM Images\Brain") or in a subfolder of this folder (e.g., "C:\DICOM Images\Patient1\Series1\Knee") can be added to the Dicom Directory. This can be done either at construction time or later by using the method DicomDir.Reset. This folder is then the destination folder of the DICOMDIR File.Īt the beginning of the application, the destination folder should be specified. LEADTOOLS provides the DicomDir class to simplify the process of creating DICOM Directories for file-sets.Īs a demonstration of a typical usage of the DicomDir class, let's suppose that we need to build the DICOM Directory of the file-set defined by the files contained in the folder "C:\DICOM Images\" and in any subfolders. The DICOM files in the file-set are assigned File IDs, so that they can be referenced by the DICOMDIR File, which itself, is identified by a File ID of DICOMDIR.

The DICOMDIR file contains Dicom Directory information, which makes it easier to access the information contained in the other DICOM files in the file-set. One of the files contained in the file-set is the DICOMDIR file. A DICOM file-set contains one or more DICOM files. In order to identify a DICOM file-set, and to facilitate accessing the information stored in the DICOM files of the file-set, the DICOM standard has defined the Basic Directory IOD.
