DicomObjects.NetStandard Documentation
DicomObjects Namespace / DicomImage Class / Import Method / Import(Stream,String) Method

The System IO Stream to read

The type of import operation to perform




In This Topic
    Import(Stream,String) Method
    In This Topic
    Copies the image data from a System IO Stream
    Syntax
    'Declaration
     
    
    Public Overloads Sub Import( _
       ByVal stream As Stream, _
       ByVal format As String _
    ) 
    'Usage
     
    
    Dim instance As DicomImage
    Dim stream As Stream
    Dim format As String
     
    instance.Import(stream, format)
    public void Import( 
       Stream stream,
       string format
    )
    public:
    void Import( 
       Stream^ stream,
       String^ format
    ) 

    Parameters

    stream

    The System IO Stream to read

    format

    The type of import operation to perform

    Remarks

    Like the Paste method, this method modifies only the minimum number of attributes necessary to ensure consistency of the image. In order to produce a valid DICOM SOP instance, many other attributes (depending on the SOP class) must be added.

    All formats which are supported via Bitmap overloads (or including JPEG 2000) are supported.

    The following applies to JPEG file import:

    • The JPEG data is imported directly, and may either be stored or transmitted unchanged as a JPEG encapsulated SOP instance (1.2.840.10008.1.2.4.50), or automatically decompressed if necessary.
    • The Type parameter must be JPEG or JPG

    The following applies to JPEG 2000 file import:

    • The import format must be "J2K", "JPC" or "JP2"
    • The JPEG 2000 data is imported directly, and may either be stored or transmitted unchanged as a JPEG 2000 encapsulated SOP instance (1.2.840.10008.1.2.4.90 or .91), or automatically decompressed if necessary.
    • The Type parameter must be J2K, JPC or JP2.
    • For JP2, the header is stripped

    The following applies to AVI file import:

    • The Type parameter must be AVI.
    • A multi-frame DICOM image is generated.

    See for details of how to write and configure your own codecs.

    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