Open
Contents
[
Hide
]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)
| Parameter | Type | Description |
|---|---|---|
| stream | Stream | The stream with DICOM file data. |
| fallbackEncoding | Encoding | Encoding to use if encoding cannot be obtained from DICOM file. |
| strategy | ITagDataReadingStrategy | The 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
| exception | condition |
|---|---|
| BadDicomFileException | stream is not a valid DICOM. |
See Also
- interface ITagDataReadingStrategy
- class DicomFile
- namespace Aspose.Medical.Dicom
- assembly Aspose.Medical
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)
| Parameter | Type | Description |
|---|---|---|
| file | String | The file name of the DICOM file. |
| fallbackEncoding | Encoding | Encoding to use if encoding cannot be obtained from DICOM file. |
| strategy | ITagDataReadingStrategy | The 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
| exception | condition |
|---|---|
| ArgumentException | Value cannot be null or whitespace. |
| FileNotFoundException | The file specified in file was not found. |
| BadDicomFileException | file is not a valid DICOM file. |
See Also
- interface ITagDataReadingStrategy
- class DicomFile
- namespace Aspose.Medical.Dicom
- assembly Aspose.Medical