Show / Hide Table of Contents

# Class IMeasurementDataExtensions

Extension methods for IMeasurementData

##### Inheritance

object
IMeasurementDataExtensions

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: NixUniversalSDK

###### Assembly: NixUniversalSDK.dll

##### Syntax

    public static class IMeasurementDataExtensions

### Methods

#### ProvidesColor(IMeasurementData, Illuminant, Observer)

Returns `true` if color data for the selected combination of illuminant and observer are available for this measurement.

##### Declaration

    public static bool ProvidesColor(this IMeasurementData data, Illuminant illuminant, Observer observer)

##### Parameters

Type | Name | Description
--- | --- | ---
IMeasurementData | data |
Illuminant | illuminant |
Observer | observer |

##### Returns

Type | Description
--- | ---
bool |

#### ProvidesColor(IMeasurementData, ReferenceWhite)

Returns `true` if color data for the selected combination of illuminant and observer are available for this measurement.

##### Declaration

    public static bool ProvidesColor(this IMeasurementData data, ReferenceWhite reference)

##### Parameters

Type | Name | Description
--- | --- | ---
IMeasurementData | data |
ReferenceWhite | reference |

##### Returns

Type | Description
--- | ---
bool |

#### ToColorData(IMeasurementData, Illuminant, Observer, ColorType)

Provides color data from this measurement for the specified illuminant and observer white point.

##### Declaration

    public static IColorData ToColorData(this IMeasurementData data, Illuminant illuminant = Illuminant.D50, Observer observer = Observer.CIE1931, ColorType type = ColorType.CIEXYZ)

##### Parameters

Type | Name | Description
--- | --- | ---
IMeasurementData | data | Data instance
Illuminant | illuminant | Selected reference illuminant (defaults to D50)
Observer | observer | Selected reference observer (defaults to CIE1931)
ColorType | type | Output color type (defaults to CIEXYZ)

##### Returns

Type | Description
--- | ---
IColorData | Color data, or `null` if the specified white point it not available for this measurement.

#### ToRgbValue(IMeasurementData, Illuminant, Observer)

Provides an sRGB value for this measurement for the specified illuminant and observer white point. Result is `null` if the specified white point is not available for this measurement.

##### Declaration

    public static byte[] ToRgbValue(this IMeasurementData data, Illuminant illuminant = Illuminant.D50, Observer observer = Observer.CIE1931)

##### Parameters

Type | Name | Description
--- | --- | ---
IMeasurementData | data | Data instance
Illuminant | illuminant | Selected reference illuminant (defaults to D50)
Observer | observer | Selected reference observer (defaults to CIE1931)

##### Returns

Type | Description
--- | ---
byte[] | sRGB value

#### ToRgbValue(IMeasurementData, ReferenceWhite)

Provides an sRGB value for this measurement for the specified illuminant and observer white point. Result is `null` if the specified white point is not available for this measurement.

##### Declaration

    public static byte[] ToRgbValue(this IMeasurementData data, ReferenceWhite reference = ReferenceWhite.D50_2)

##### Parameters

Type | Name | Description
--- | --- | ---
IMeasurementData | data | Data instance
ReferenceWhite | reference | Selected reference white (defaults to D50_2)

##### Returns

Type | Description
--- | ---
byte[] | sRGB value