Enum DicomVR
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 = 1Application Entity: up to 16 characters.
AS = 2Age String: such as
045Y.AT = 3Attribute Tag: tags, 4 bytes each.
CS = 4Code String: up to 16 upper-case characters.
DA = 5Date:
YYYYMMDD.DS = 6Decimal String: decimal numbers as text.
DT = 7Date Time:
YYYYMMDDHHMMSS.FFFFFF&ZZXX, trailing parts optional.FD = 8Floating Point Double: 8-byte IEEE numbers.
FL = 9Floating Point Single: 4-byte IEEE numbers.
IS = 10Integer String: integers as text.
LO = 11Long String: up to 64 characters.
LT = 12Long Text: up to 10240 characters, one value.
OB = 13Other Byte: bytes.
OD = 14Other Double: 8-byte IEEE numbers.
OF = 15Other Float: 4-byte IEEE numbers.
OL = 16Other Long: 32-bit words.
OV = 17Other Very Long: 64-bit words.
OW = 18Other Word: 16-bit words.
PN = 19Person Name: components separated by
^, groups by=.SH = 20Short String: up to 16 characters.
SL = 21Signed Long: 32-bit signed integers.
SQ = 22Sequence of Items: nested datasets.
SS = 23Signed Short: 16-bit signed integers.
ST = 24Short Text: up to 1024 characters, one value.
SV = 25Signed Very Long: 64-bit signed integers.
TM = 26Time:
HHMMSS.FFFFFF, trailing parts optional.UC = 27Unlimited Characters: text of any length, several values.
UI = 28Unique Identifier: a dotted UID such as
1.2.840.10008.1.2.UL = 29Unsigned Long: 32-bit unsigned integers.
UN = 0Unknown (UN): bytes whose encoding the file does not say; also any code this version does not know.
UR = 30Universal Resource Identifier: one URI or URL.
US = 31Unsigned Short: 16-bit unsigned integers.
UT = 32Unlimited Text: text of any length, one value.
UV = 33Unsigned 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);
}