DicomObjects Reference
DicomObjects Reference / DicomDataSet Object / WriteDirectory Method
The name of the file to write.
This is passed unmodified to the operating system, and it is therefore the container’s responsibility to ensure either that the current directory is set correctly, or that a fully qualified filename is provided.
In This Topic
    WriteDirectory Method
    In This Topic
    Description
    Writes a dataset to a DICOMDIR file
    Syntax
    Visual Basic
    Public Sub WriteDirectory( _
       ByVal FileName As String _
    ) 
    Parameters
    FileName
    The name of the file to write.
    This is passed unmodified to the operating system, and it is therefore the container’s responsibility to ensure either that the current directory is set correctly, or that a fully qualified filename is provided.
    Remarks

    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.

    See Also