DicomObjects.NET8 Documentation
DicomObjects Namespace / DicomImage Class / Import Method / Import(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 current directory is set correctly, or that a fully qualified filename is provided.




In This Topic
    Import(String) Method
    In This Topic
    Copies the image data from an external image
    Syntax
    'Declaration
     
    
    Public Overloads Sub Import( _
       ByVal fileName As String _
    ) 
    'Usage
     
    
    Dim instance As DicomImage
    Dim fileName As String
     
    instance.Import(fileName)
    public void Import( 
       string fileName
    )
    public:
    void Import( 
       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 current directory is set correctly, or that a fully qualified filename is provided.

    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.

    The import file format is detected automatically, if DicomObjects cannot detect the file type then it will use the file extension as the format.

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

    File extensions for supported formats are:

    • JPEG: "JPEG" or "JPG"
    • Bitmap: "BMP"
    • DIB: "DIB"
    • AVI: "AVI"

    A multiframe image is created if the input data is a multipage Image

    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