Skip to content

# Handling Measurement Data

Measurements from Nix devices are provided as objects conforming to the `IMeasurementData` interface. These contain all data and metadata to completely describe the measurement. Color, spectral, and density data are obtained from the `IMeasurementData` instance as `IColorData`, `ISpectralData`, and `IDensityData` respectively. The differences between these object types are listed below.

## IMeasurementData

- Corresponds to a single measurement in a single `ScanMode` from a Nix device
- Provides color data as `IColorData`
  - To get color data, call `toColorData()`
  - All devices provide data for D50/2° reference white
  - Some devices provide additional color data for other reference white values
  - To check if available, call `providesColor()`
- May provide spectral data as `ISpectralData`, depending on the device type and license capabilities
  - To check if available, use `getProvidesSpectral()`
  - To get spectral data, use `getSpectralData()`
- May provide density data as `IDensityData`, depending on the device type and license capabilities
  - To check if available, use `getProvidesDensity()`
  - To get density data, use `toDensityData()`
- The measurement data contains all data and metadata to completely describe the measurement
  - For maximum fidelity and ease of use when saving data, save the string data from `getRaw()`.
  - The raw string value can be used to reconstruct measurement data using `fromRaw()`.
- Refer to the `IMeasurementData` API documentation for full details (Kotlin or Java)

### Supported `IColorData` output based on device type

Reference | Mini | Mini 2 | Mini 3 | Pro | Pro 2 | QC | Spectro 2 | Spectro L
--- | --- | --- | --- | --- | --- | --- | --- | ---
A/2° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
A/10° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
C/2° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
C/10° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
D50/2° | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | ☑ | ☑
D50/10° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
D55/2° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
D55/10° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
D65/2° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
D65/10° | ☐ | ☑ | ☑ | ☐ | ☑ | ☑ | ☑ | ☑
D75/2° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
D75/10° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
F2/2° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
F2/10° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
F7/2° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
F7/10° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
F11/2° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑
F11/10° | ☐ | ☐ | ☑ | ☐ | ☐ | ☐ | ☑ | ☑

### Supported `ISpectralData` and `IDensityData` output based on device type

Device Type | Supports spectral output | Supports density output
--- | --- | ---
Mini | ☐ | ☐
Mini 2 | ☐ | ☐
Mini 3 | ☐ | ☐
Pro | ☐ | ☐
Pro 2 | ☐ | ☐
QC | ☐ | ☐
Spectro 2 | ☑ | ☑
Spectro L | ☑ | ☑

Warning

The table above indicates whether or not the hardware device is capable of providing these data types. However, these values will only be available if enabled by the active license. See Other license properties for more details.

Tip

The `IMeasurementData` flags `providesSpectral` and `providesDensity` take into account both the device and license capabilities and can be used to determine if these data are currently available.

## IColorData

- Consists of colorimetry data for a single reference white point (e.g. - D50/2°) and single measurement mode (e.g. - M2)
- Can be obtained directly from an `IMeasurementData` object, from or an `ISpectralData` object
- Full description of a color consisting of:
  - Type / color system: `getType()` as `ColorType` enum
  - Value: `getValue()` as double array (3 channels)
    - Format matches the system defined by `getType()`
  - Reference white point: `getReference()` as `ReferenceWhite` enum
  - Scan mode: `getMode()` as `ScanMode` enum
- Regardless of `getType()`, the color is always backed internally by a CIEXYZ value
- Color can be converted between any of the types specified in the `ColorType` enum by calling `convertTo()`
- Delta E to another `IColorData` instance can be evaluated using `compareTo()`.
  - Both `IColorData` objects must share the same reference, otherwise the result with be NaN
  - If the color difference type is not specified, the default is CIE2000. See the `ColorDifferenceType` enum for other options (Kotlin or Java)
- sRGB value can be fetched using `getRgbValue()`
- Refer to the `IColorData` API documentation for full details (Kotlin or Java)

## ISpectralData

- Consists of spectral data for a single measurement mode
- Obtained from an `IMeasurementData` object that supports spectral data
- Full description of the spectral measurement consisting of:
  - Scan mode: `getMode()` as `ScanMode` enum
  - Wavelength values: `getLambda()` as integer array
  - Spectral values: `getValue()` as float array
- Can be used to obtain density data as `IDensityData` using `toDensityData()`, if enabled by the current license
- Can be used to obtain colorimetry data as `IColorData` object for any reference white using `toColorData()`
- sRGB value can be fetched for any reference white using `toRgbValue()`
- Refer to the `ISpectralData` API documentation for full details (Kotlin or Java)

## IDensityData

- Consists of density data for a single measurement mode and single 'ISO status' / lookup table
- Obtained from an `IMeasurementData` object that supports spectral data, or an `ISpectralData` object
- Description of the density values for a specific 'ISO Status' consisting of:
  - Scan mode: `getMode()` as `ScanMode`
  - ISO status: `getStatus()` as `DensityStatus` enum
  - Density values: `getValue()` as double array (4 channels)
    - Index 0: C
    - Index 1: M
    - Index 2: Y
    - Index 3: K
  - Automatic density index: `getAutoIndex()` as integer value
- Refer to the `IDensityData` API documentation for full details (Kotlin or Java)

Tip

The `ColorUtils` class provides many helpful functions for manual colour conversions and delta E calculations. Further details are provided in the API reference (Kotlin and Java).

## Next steps

- Review the frequently asked questions
- Review the example app
- Get additional support