# SpectralData

class SpectralData(val lambda: IntArray, val value: FloatArray, val mode: ScanMode = ScanMode.M2) : ISpectralData

Class describing spectral data obtained from a measurement

## Constructors

SpectralData
Link copied to clipboard
constructor(lambda: IntArray, value: FloatArray, mode: ScanMode = ScanMode.M2)

## Properties

interval
Link copied to clipboard
open override val interval: Int

Wavelength spacing (eg - 10 nm)

lambda
Link copied to clipboard
open override val lambda: IntArray

Wavelength values. Each entry `i` in this array corresponds to a spectral value in value at the same index.

mode
Link copied to clipboard
open override val mode: ScanMode

Scan mode for this measurement (one of ScanMode.M0, ScanMode.M1, or ScanMode.M2)

value
Link copied to clipboard
open override val value: FloatArray

Spectral reflectance values. Each entry `i` in this array corresponds to a wavelength value in lambda at the same index.

## Functions

interpolate
Link copied to clipboard
open override fun interpolate(lT: Float): Float

Provides an interpolated reflectance value at a specified wavelength value using natural cubic spines. The cubic splines are evaluated at the points specified by lambda and value. Interpolated values are evaluated using natural cubic splines.

toColorData
Link copied to clipboard
open fun toColorData(illuminant: Illuminant = Illuminant.D50, observer: Observer = Observer.CIE1931, type: IColorData.ColorType = ColorType.CIEXYZ): IColorData?
open override fun toColorData(reference: ReferenceWhite = ReferenceWhite.D50_2, type: IColorData.ColorType = ColorType.CIEXYZ): IColorData?

Provides color data from this measurement for the specified illuminant and observer white point. Result is `null` if an invalid white point is specified.

toColorInt
Link copied to clipboard
@ColorInt
open fun toColorInt(reference: ReferenceWhite = ReferenceWhite.D50_2): Int?
@ColorInt
open fun toColorInt(illuminant: Illuminant = Illuminant.D50, observer: Observer = Observer.CIE1931): Int?

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

toDensityData
Link copied to clipboard
open fun toDensityData(status: DensityStatus = DensityStatus.T): IDensityData?

Provides absolute density values for this measurement for the specified density status evaluated as per ISO 5-3:2009, or `null` if the LicenseFeature.DENSITY_DATA feature is not enabled for the current license. See also LicenseManager.Shared.isFeatureEnabled.

toRgbValue
Link copied to clipboard
open fun toRgbValue(illuminant: Illuminant = Illuminant.D50, observer: Observer = Observer.CIE1931): IntArray?
open override fun toRgbValue(reference: ReferenceWhite = ReferenceWhite.D50_2): IntArray?

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