DicomObjects.NET Core Documentation
DicomObjects Namespace / DicomDataSetCollection Class / Read Method / Read(String) Method

The name of the file to read.

This is passed unmodified to the operating system, and it is therefore the container’s responsibility to ensure either that the file exists within the current directory, or that a fully qualified filename is provided.




In This Topic
    Read(String) Method
    In This Topic
    Creates and adds a DicomDataSet from an external DICOM file
    Syntax
    'Declaration
     
    
    Public Overloads Function Read( _
       ByVal FileName As String _
    ) As DicomDataSet
    'Usage
     
    
    Dim instance As DicomDataSetCollection
    Dim FileName As String
    Dim value As DicomDataSet
     
    value = instance.Read(FileName)
    public DicomDataSet Read( 
       string FileName
    )
    public:
    DicomDataSet^ Read( 
       String^ FileName
    ) 

    Parameters

    FileName

    The name of the file to read.

    This is passed unmodified to the operating system, and it is therefore the container’s responsibility to ensure either that the file exists within the current directory, or that a fully qualified filename is provided.

    Return Value

    If successful, a DicomDataSet Object is returned, and is added to the appropriate collection. If unsuccessful, an appropriate error is thrown.
    Remarks

    This method can read either official "Part10" format files with the 128 byte header, or unofficial "Part5" format files without a header. Detection of the type is automatic.

    The file may have been written by the Write method or by other DICOM software.

    By default, pixel data is read only when it is required, greatly speeding the display of multi-frame images, and reducing memory requirements. However, a side effect of this is that any elements after the pixel data (7FE0,0010) will not be read. This should not affect most applications, but if necessary, this behavior may be over-ridden using the DicomGlobal.CloseFilesAfterReading property.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also