Open

Open(Stream, Encoding?, ITagDataReadingStrategy?)

Reads the specified DICOM file and returns the DicomFile.

public static DicomFile Open(Stream stream, Encoding? fallbackEncoding = null, 
    ITagDataReadingStrategy? strategy = null)
ParameterTypeDescription
streamStreamThe stream with DICOM file data.
fallbackEncodingEncodingEncoding to use if encoding cannot be obtained from DICOM file.
strategyITagDataReadingStrategyThe options controlling how DICOM tag data is accessed from a dataset, including strategies for immediate loading, deferred (on-demand) loading, or selective reading of large-value elements.

Return Value

The DicomFile instance.

Exceptions

exceptioncondition
BadDicomFileExceptionstream is not a valid DICOM.

See Also


Open(string, Encoding?, ITagDataReadingStrategy?)

Reads the specified DICOM file and returns the DicomFile.

public static DicomFile Open(string file, Encoding? fallbackEncoding = null, 
    ITagDataReadingStrategy? strategy = null)
ParameterTypeDescription
fileStringThe file name of the DICOM file.
fallbackEncodingEncodingEncoding to use if encoding cannot be obtained from DICOM file.
strategyITagDataReadingStrategyThe options controlling how DICOM tag data is accessed from a dataset, including strategies for immediate loading, deferred (on-demand) loading, or selective reading of large-value elements.

Return Value

The DicomFile instance.

Exceptions

exceptioncondition
ArgumentExceptionValue cannot be null or whitespace.
FileNotFoundExceptionThe file specified in file was not found.
BadDicomFileExceptionfile is not a valid DICOM file.

See Also