Table of Contents

Class DicomFragments

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

Encapsulated pixel data (PS3.5 section A.4): the Basic Offset Table, the fragments that follow it, and the Extended Offset Table when the dataset has one. The fragments are compressed data as stored; a frame may span several.

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

Examples

// Compressed pixel data stays as the fragments the file stores, with its offset tables.
DicomFile file = DicomFile.Load("compressed.dcm");
DicomFragments? pixels = file.Dataset["PixelData"]?.Fragments;
if (pixels is not null)
{
    Console.WriteLine($"{file.TransferSyntax.Name}: {pixels.Fragments.Count} fragments, {pixels.BasicOffsetTable.Count} frame offsets");
}

Properties

BasicOffsetTable

Gets the Basic Offset Table: for each frame, the byte offset of its first fragment's item tag from the first fragment's item tag. Empty when the file left it empty.

public IReadOnlyList<uint> BasicOffsetTable { get; }

Property Value

IReadOnlyList<uint>

ExtendedOffsetTable

Gets the Extended Offset Table (7FE0,0001): each frame's offset like BasicOffsetTable's, or empty.

public IReadOnlyList<ulong> ExtendedOffsetTable { get; }

Property Value

IReadOnlyList<ulong>

ExtendedOffsetTableLengths

Gets the Extended Offset Table Lengths (7FE0,0002): each frame's length in bytes, or empty.

public IReadOnlyList<ulong> ExtendedOffsetTableLengths { get; }

Property Value

IReadOnlyList<ulong>

Fragments

Gets the fragments' values, in file order, without their item headers.

public IReadOnlyList<ReadOnlyMemory<byte>> Fragments { get; }

Property Value

IReadOnlyList<ReadOnlyMemory<byte>>