Table of Contents

Enum DicomVR

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

A value representation: how an element's value is encoded (PS3.5 section 6.2).

[Experimental("EGAMIX001", UrlFormat = "https://github.com/inexin/Egami/blob/main/docs/articles/formats/dicom.md")]
public enum DicomVR

Fields

AE = 1

Application Entity: up to 16 characters.

AS = 2

Age String: such as 045Y.

AT = 3

Attribute Tag: tags, 4 bytes each.

CS = 4

Code String: up to 16 upper-case characters.

DA = 5

Date: YYYYMMDD.

DS = 6

Decimal String: decimal numbers as text.

DT = 7

Date Time: YYYYMMDDHHMMSS.FFFFFF&ZZXX, trailing parts optional.

FD = 8

Floating Point Double: 8-byte IEEE numbers.

FL = 9

Floating Point Single: 4-byte IEEE numbers.

IS = 10

Integer String: integers as text.

LO = 11

Long String: up to 64 characters.

LT = 12

Long Text: up to 10240 characters, one value.

OB = 13

Other Byte: bytes.

OD = 14

Other Double: 8-byte IEEE numbers.

OF = 15

Other Float: 4-byte IEEE numbers.

OL = 16

Other Long: 32-bit words.

OV = 17

Other Very Long: 64-bit words.

OW = 18

Other Word: 16-bit words.

PN = 19

Person Name: components separated by ^, groups by =.

SH = 20

Short String: up to 16 characters.

SL = 21

Signed Long: 32-bit signed integers.

SQ = 22

Sequence of Items: nested datasets.

SS = 23

Signed Short: 16-bit signed integers.

ST = 24

Short Text: up to 1024 characters, one value.

SV = 25

Signed Very Long: 64-bit signed integers.

TM = 26

Time: HHMMSS.FFFFFF, trailing parts optional.

UC = 27

Unlimited Characters: text of any length, several values.

UI = 28

Unique Identifier: a dotted UID such as 1.2.840.10008.1.2.

UL = 29

Unsigned Long: 32-bit unsigned integers.

UN = 0

Unknown (UN): bytes whose encoding the file does not say; also any code this version does not know.

UR = 30

Universal Resource Identifier: one URI or URL.

US = 31

Unsigned Short: 16-bit unsigned integers.

UT = 32

Unlimited Text: text of any length, one value.

UV = 33

Unsigned Very Long: 64-bit unsigned integers.

Examples

DicomDataset data = file.Dataset;
DateOnly? studyDate = data["StudyDate"]?.GetDate();
DicomPersonName? patient = data["PatientName"]?.GetPersonName();
double[] window = data["WindowCenter"]?.GetNumbers() ?? [];

// A sequence is a list of datasets; text decodes by the dataset's Specific Character Set.
foreach (DicomDataset item in data["ContentSequence"]?.Items ?? [])
{
    Console.WriteLine(item.GetString("ReferencedSOPClassUID"));
}

// Every element prints as a dump line, such as "(0028,0010) US Rows: 4".
foreach (DicomElement element in data)
{
    Console.WriteLine(element);
}