DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomDataSetCollection Class / Read Method / Read(Stream,ReadBehaviours) Method

The stream from which to read.

The behaviours to be used when reading this stream







In This Topic
    Read(Stream,ReadBehaviours) Method
    In This Topic
    Reads a DICOM file from a Stream
    Syntax
    'Declaration
     
    
    Public Overloads Function Read( _
       ByVal Stream As System.IO.Stream, _
       Optional ByVal ReadBehaviour As ReadBehaviours _
    ) As DicomDataSet
    'Usage
     
    
    Dim instance As DicomDataSetCollection
    Dim Stream As System.IO.Stream
    Dim ReadBehaviour As ReadBehaviours
    Dim value As DicomDataSet
     
    value = instance.Read(Stream, ReadBehaviour)
    public DicomDataSet Read( 
       System.IO.Stream Stream,
       ReadBehaviours ReadBehaviour
    )
    public function Read( 
        Stream: System.IO.Stream;
        ReadBehaviour: ReadBehaviours
    ): DicomDataSet; 
    public function Read( 
       Stream : System.IO.Stream,
       ReadBehaviour : ReadBehaviours
    ) : DicomDataSet;
    public: DicomDataSet* Read( 
       System.IO.Stream* Stream,
       ReadBehaviours* ReadBehaviour
    ) 
    public:
    DicomDataSet^ Read( 
       System.IO.Stream^ Stream,
       ReadBehaviours^ ReadBehaviour
    ) 

    Parameters

    Stream

    The stream from which to read.

    ReadBehaviour

    The behaviours to be used when reading this stream

    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 streams in either official "Part10" format, with the 128 byte header, or unofficial "Part5" format, without a header. Detection of the type is automatic.

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

    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also