DicomObjects.NET Core Documentation
DicomObjects Namespace / DicomDataSet 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 DicomDataSet
    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 can be supported by Windows via new Bitmap(Stream) or explicitly via (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