# SpectralData

public final class SpectralData implements ISpectralData

Class describing spectral data obtained from a measurement

## Constructors

SpectralData
Link copied to clipboard
public SpectralData SpectralData(IntArray lambda, FloatArray value, ScanMode mode)

## Properties

interval
Link copied to clipboard
private final Integer interval

Wavelength spacing (eg - 10 nm)

lambda
Link copied to clipboard
private final IntArray lambda

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

mode
Link copied to clipboard
private final ScanMode mode

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

value
Link copied to clipboard
private final FloatArray value

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

## Functions

getInterval
Link copied to clipboard
public Integer getInterval()

Wavelength spacing (eg - 10 nm)

getLambda
Link copied to clipboard
public IntArray getLambda()

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

getMode
Link copied to clipboard
public ScanMode getMode()

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

getValue
Link copied to clipboard
public FloatArray getValue()

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

interpolate
Link copied to clipboard
public Float interpolate(Float lT)

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
public IColorData toColorData(Illuminant illuminant, Observer observer, IColorData.ColorType type)
public IColorData toColorData(ReferenceWhite reference, IColorData.ColorType type)

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()
public Integer toColorInt(ReferenceWhite reference)
@ColorInt()
public Integer toColorInt(Illuminant illuminant, Observer observer)

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
public IDensityData toDensityData(DensityStatus status)

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
public IntArray toRgbValue(Illuminant illuminant, Observer observer)
public IntArray toRgbValue(ReferenceWhite reference)

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.