Class PhotometricInterpretation
Namespace: Aspose.Medical.Dicom.Imaging
Assembly: Aspose.Medical.dll (25.11.0)
Photometric Interpretation. See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2/ .
public sealed class PhotometricInterpretation : ISpanParsable<photometricinterpretation>, IParsable<photometricinterpretation>, IEquatable<photometricinterpretation>Inheritance
object ← PhotometricInterpretation
Implements
ISpanParsable<photometricinterpretation> , IParsable<photometricinterpretation> , IEquatable<photometricinterpretation>
Inherited Members
object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Properties
ColorSpace
The color space of the photometric interpretation, or null if Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.IsPalette is false. Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.ColorSpace.
public ColorSpace? ColorSpace { get; }Property Value
Description
The description of the photometric interpretation. Read-only System.String.
public string Description { get; }Property Value
IsColor
Specifies whether the photometric interpretation represents color (true) or grayscale ( false). Read-only System.Boolean.
public bool IsColor { get; }Property Value
IsPalette
Specifies whether the photometric interpretation is represented by a palette of colors. Read-only System.Boolean.
public bool IsPalette { get; }Property Value
IsYbr
Specifies whether the photometric interpretation represents an YBR color scheme. Read-only System.Boolean.
public bool IsYbr { get; }Property Value
Monochrome1
Pixel data represent a single monochrome image plane. The minimum sample value is intended to be displayed as white after any VOI gray scale transformations have been performed. See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=Defined%20Terms%3A-,MONOCHROME1,-Pixel%20data%20represent . This value may be used only when Samples per Pixel (0028,0002) has a value of 1. Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation Monochrome1 { get; }Property Value
Monochrome2
Pixel data represent a single monochrome image plane. The minimum sample value is intended to be displayed as black after any VOI gray scale transformations have been performed. See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=in%20PS3.5%20.-,MONOCHROME2,-Pixel%20data%20represent . This value may be used only when Samples per Pixel (0028,0002) has a value of 1. Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation Monochrome2 { get; }Property Value
PaletteColor
Pixel data describe a color image with a single sample per pixel (single image plane). The pixel value is used as an index into each of the Red, Blue, and Green Palette Color Lookup Tables (0028,1101-1103 & 1201-1203). This value may be used only when Samples per Pixel (0028,0002) has a value of 1. When the Photometric Interpretation is Palette Color; Red, Blue, and Green Palette Color Lookup Tables shall be present. See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=in%20PS3.5%20.-,PALETTE%20COLOR,-Pixel%20data%20describe . Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation PaletteColor { get; }Property Value
Rgb
Pixel data represent a color image described by red, green, and blue image planes. The minimum sample value for each color plane represents minimum intensity of the color. This value may be used only when Samples per Pixel (0028,0002) has a value of 3. See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=shall%20be%20present.-,RGB,-Pixel%20data%20represent . Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation Rgb { get; }Property Value
Unknown
Unknown Photometric Interpretation. Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation Unknown { get; }Property Value
Value
The identifier value, corresponding with a DICOM defined term for tag (0028, 0004). Read-only System.String.
public string Value { get; }Property Value
YbrFull
Pixel data represent a color image described by one luminance (Y) and two chrominance planes (Cb and Cr). This photometric interpretation may be used only when Samples per Pixel (0028,0002) has a value of 3. Black is represented by Y equal to zero. The absence of color is represented by both Cb and Cr values equal to half full scale.
In the case where Bits Allocated (0028,0100) has a value of 8 then the following equations convert between RGB and YCBCR Photometric Interpretation: Y = + .2990R + .5870G + .1140B Cb = - .1687R - .3313G + .5000B + 128 Cr = + .5000R - .4187G - .0813B + 128
See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=Retired.-,YBR_FULL,-Pixel%20data%20represent . Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation YbrFull { get; }Property Value
YbrFull422
The same as YBR_FULL except that the Cb and Cr values are sampled horizontally at half the Y rate and as a result there are half as many Cb and Cr values as Y values.
This Photometric Interpretation is only allowed with Planar Configuration (0028,0006) equal to 0. Two Y values shall be stored followed by one Cb and one Cr value. The Cb and Cr values shall be sampled at the location of the first of the two Y values. For each Row of Pixels, the first Cb and Cr samples shall be at the location of the first Y sample. The next Cb and Cr samples shall be at the location of the third Y sample etc. See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=2%20dated%201990.-,YBR_FULL_422,-The%20same%20as . Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation YbrFull422 { get; }Property Value
YbrIct
Pixel data represent a color image described by one luminance (Y) and two chrominance planes (Cb and Cr). This photometric interpretation may be used only when Samples per Pixel (0028,0002) has a value of 3. Black is represented by Y equal to zero. The absence of color is represented by both Cb and Cr values equal to zero.
Regardless of the value of Bits Allocated (0028,0100), the following equations convert between RGB and YCbCr Photometric Interpretation: Y = + .29900R + .58700G + .11400B Cb = - .16875R - .33126G + .50000B Cr = + .50000R - .41869G - .08131B
See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=the%20third%20etc.-,YBR_ICT,-Irreversible%20Color%20Transformation . Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation YbrIct { get; }Property Value
YbrPartial420
The same as YBR_PARTIAL_422 except that the Cb and Cr values are sampled horizontally and vertically at half the Y rate and as a result there are four times less Cb and Cr values than Y values, versus twice less for YBR_PARTIAL_422.
This Photometric Interpretation is only allowed with Planar Configuration (0028,0006) equal to 0. The Cb and Cr values shall be sampled at the location of the first of the two Y values. For the first Row of Pixels (etc.), the first Cb and Cr samples shall be at the location of the first Y sample. The next Cb and Cr samples shall be at the location of the third Y sample etc. The next Rows of Pixels containing Cb and Cr samples (at the same locations than for the first Row) will be the third etc.
See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=PS3.3%2D2017b.-,YBR_PARTIAL_420,-Pixel%20data%20represent . Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation YbrPartial420 { get; }Property Value
YbrPartial422
The same as YBR_FULL_422 except that: black corresponds to Y = 16; Y is restricted to 220 levels (i.e. the maximum value is 235); Cb and Cr each has a minimum value of 16; Cb and Cr are restricted to 225 levels (i.e. the maximum value is 240); lack of color is represented by Cb and Cr equal to 128.
In the case where Bits Allocated (0028,0100) has value of 8 then the following equations convert between RGB and YBR_PARTIAL_422 Photometric Interpretation: Y = + .2568R + .5041G + .0979B + 16 Cb = - .1482R - .2910G + .4392B + 128 Cr = + .4392R - .3678G - .0714B + 128
See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=2008%5D.-,YBR_PARTIAL_422,-Retired.%20See%20PS3.3 . Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation YbrPartial422 { get; }Property Value
YbrRct
Pixel data represent a color image described by one luminance (Y) and two chrominance planes (Cb and Cr). This photometric interpretation may be used only when Samples per Pixel (0028,0002) has a value of 3. Black is represented by Y equal to zero. The absence of color is represented by both Cb and Cr values equal to zero.
Regardless of the value of Bits Allocated (0028,0100), the following equations convert between RGB and YBR_RCT Photometric Interpretation: Y = floor((R + 2G +B) / 4) Cb = B - G Cr = R - G
The following equations convert between YBR_RCT and RGB Photometric Interpretation: R = Cr + G G = Y – floor((Cb + Cr) / 4) B = Cb + G
See https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_c.7.6.3.html#sect_C.7.6.3.1.2:~:text=2000%20bit%20stream.-,YBR_RCT,-Reversible%20Color%20Transformation . Read-only Aspose.Medical.Dicom.Imaging.PhotometricInterpretation.
public static PhotometricInterpretation YbrRct { get; }Property Value
Methods
Equals(PhotometricInterpretation?)
public bool Equals(PhotometricInterpretation? other)Parameters
other PhotometricInterpretation
?
Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object
?
Returns
GetHashCode()
public override int GetHashCode()Returns
Parse(string, IFormatProvider?)
static PhotometricInterpretation Parse(string s, IFormatProvider? provider)Parameters
s string
provider IFormatProvider
?
Returns
Exceptions
Unknown Photometric Interpretation.
Parse(ReadOnlySpan<char>, IFormatProvider?)
static PhotometricInterpretation Parse(ReadOnlySpan<char> s, IFormatProvider? provider)Parameters
s ReadOnlySpan
<
char
>
provider IFormatProvider
?
Returns
Exceptions
Unknown Photometric Interpretation.
ToString()
public override string ToString()Returns
TryParse(string?, IFormatProvider?, out PhotometricInterpretation?)
static bool TryParse(string? s, IFormatProvider? provider, out PhotometricInterpretation? result)Parameters
s string
?
provider IFormatProvider
?
result PhotometricInterpretation
?
Returns
TryParse(ReadOnlySpan<char>, IFormatProvider?, out PhotometricInterpretation?)
static bool TryParse(ReadOnlySpan<char> s, IFormatProvider? provider, out PhotometricInterpretation? result)Parameters
s ReadOnlySpan
<
char
>
provider IFormatProvider
?
result PhotometricInterpretation
?
Returns
Operators
operator ==(PhotometricInterpretation?, PhotometricInterpretation?)
Determines whether two specified objects have the same value.
public static bool operator ==(PhotometricInterpretation? left, PhotometricInterpretation? right)Parameters
left PhotometricInterpretation
?
Left-hand side object to compare for equivalence.
right PhotometricInterpretation
?
Right-hand side object to compare for equivalence.
Returns
true if the value of left is the same as the value of right;
otherwise, false.
operator !=(PhotometricInterpretation?, PhotometricInterpretation?)
Determines whether two specified objects have different values.
public static bool operator !=(PhotometricInterpretation? left, PhotometricInterpretation? right)Parameters
left PhotometricInterpretation
?
Left-hand side object to compare for non-equivalence.
right PhotometricInterpretation
?
Right-hand side object to compare for non-equivalence.
Returns
true if the value of left is different from the value of
right;
otherwise, false.
</char></char></photometricinterpretation></photometricinterpretation></photometricinterpretation>