Visual Basic |
---|
Public Sub WriteDirectory( _ ByVal FileName As String _ ) |
The file may subsequently be read by the ReadDirectory method or by other DICOM software.
As of version 4 of DicomObjects, the easiest way to create a standard DICOMDIR file is using the AddToDirectory method.
This method is designed for writing the “DICOMDIR” directory file on exchangeable media, though it is the client program’s responsibility to ensure compliance with the requirements for such files.
Before the file is written, the sequence representing the directory entries is replaced by one created from the Children property, giving a true hierarchical directory structure.
Before using this method, the DicomDataSet’s InstanceUID property should be set to a unique value for the directory. Although stored as attribute (0008,0018) (i.e. Image InstanceUID), it is used correctly in this function, being written in the meta header as (0002,0003).
See the security page for details of restrictions on this method.