Class DicomPersonName
A Person Name (PN) value: up to three component groups, alphabetic, ideographic and phonetic, separated by =; the
alphabetic one split into its five components (PS3.5 section 6.2.1).
[Experimental("EGAMIX001", UrlFormat = "https://github.com/inexin/Egami/blob/main/docs/articles/formats/dicom.md")]
public sealed record DicomPersonName : IEquatable<DicomPersonName>
- Inheritance
-
DicomPersonName
- Implements
- Inherited Members
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);
}
Constructors
DicomPersonName(string, string, string)
A Person Name (PN) value: up to three component groups, alphabetic, ideographic and phonetic, separated by =; the
alphabetic one split into its five components (PS3.5 section 6.2.1).
public DicomPersonName(string Alphabetic, string Ideographic, string Phonetic)
Parameters
AlphabeticstringThe alphabetic group, such as
Doe^John^^Dr..IdeographicstringThe ideographic group, or empty.
PhoneticstringThe phonetic group, or empty.
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);
}
Properties
Alphabetic
The alphabetic group, such as Doe^John^^Dr..
public string Alphabetic { get; init; }
Property Value
FamilyName
Gets the family name: the alphabetic group's first component.
public string FamilyName { get; }
Property Value
GivenName
Gets the given name: the second component.
public string GivenName { get; }
Property Value
Ideographic
The ideographic group, or empty.
public string Ideographic { get; init; }
Property Value
MiddleName
Gets the middle name: the third component.
public string MiddleName { get; }
Property Value
NamePrefix
Gets the name prefix, such as a title: the fourth component.
public string NamePrefix { get; }
Property Value
NameSuffix
Gets the name suffix: the fifth component.
public string NameSuffix { get; }
Property Value
Phonetic
The phonetic group, or empty.
public string Phonetic { get; init; }
Property Value
Methods
ToString()
Returns the name as the file writes it, groups joined by = and empty trailing groups left out.
public override string ToString()
Returns
- string
The name.