Class SpectralData
- Namespace
- NixUniversalSDK
- Assembly
- NixUniversalSDK.dll
Class describing spectral reflectance data
public class SpectralData : ISpectralData
- Inheritance
-
SpectralData
- Implements
- Inherited Members
- Extension Methods
Constructors
SpectralData(int[], float[], ScanMode)
Constructs a SpectralData instance from 10 nm spectral reflectance values.
public SpectralData(int[] lambda, float[] value, ScanMode mode = ScanMode.M2)
Parameters
lambda
int[]Wavelength values
value
float[]Spectral reflectance values. Each entry
i
in this array corresponds to a wavelength value inlambda
at the same index.mode
ScanModeScan mode for this measurement.
Properties
Interval
Wavelength spacing (eg - 10 nm)
public int Interval { get; }
Property Value
Lambda
Wavelength values. Each entry i
in this array corresponds to a spectral value in Value at the same index.
public int[] Lambda { get; }
Property Value
- int[]
Mode
Scan mode for this measurement.
public ScanMode Mode { get; }
Property Value
Value
Spectral reflectance values. Each entry i
in this array corresponds to a wavelength value in Lambda at the same index.
public float[] Value { get; }
Property Value
- float[]
Methods
Interpolate(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.
public float Interpolate(float lT)
Parameters
lT
floatWavelength (nm) at which to query the interpolated reflectance
Returns
- float
Interpolated reflectance value at lT
ToColorData(ReferenceWhite, ColorType)
Provides color data from this measurement for the specified illuminant and observer white point. Result is null
if an invalid white point is specified.
public IColorData ToColorData(ReferenceWhite reference = ReferenceWhite.D50_2, ColorType type = ColorType.CIEXYZ)
Parameters
reference
ReferenceWhiteSelected reference white (defaults to D50_2)
type
ColorTypeOutput color type (defaults to CIEXYZ)
Returns
- IColorData
Color data, or
null
if an invalid white point is specified