Table of Contents

Class DicomFormat

Namespace
Egami.Formats.Extended.Dicom
Assembly
Egami.Formats.Extended.dll

DICOM (PS3.10 files, .dcm): medical images with their dataset. Registered with WithDicom(EgamiContext); in preview. A load gives one frame as a viewer shows it (see DicomReaderOptions), each frame of a multi-frame file is an image of its own for LoadAll(Stream, EgamiContext?, ReaderOptions?), and DicomFile reads every element. A save writes a Secondary Capture image (see DicomWriterOptions).

[Experimental("EGAMIX001", UrlFormat = "https://github.com/inexin/Egami/blob/main/docs/articles/formats/dicom.md")]
public static class DicomFormat
Inheritance
DicomFormat
Inherited Members

Examples

// A load gives what a viewer shows: rescaled, windowed, inverted for MONOCHROME1, colour as RGB.
EgamiContext context = new EgamiContext().WithDicom();
using Raster image = Raster.Load("scan.dcm", context);
DicomDetails details = (DicomDetails)image.Metadata.FormatDetails!;
Console.WriteLine($"{image.Layout}: window {details.WindowCenter}/{details.WindowWidth}, slope {details.RescaleSlope}");
image.Save("scan.png");

Properties

Info

Gets the format's registration: name, MIME type, extensions, signature and reader.

public static FormatInfo Info { get; }

Property Value

FormatInfo