Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Builder for chunk test data

    Index
    UINT8_DTYPES: ReadonlySet<string> = ...

    Supported uint8 dtype spellings used by withRandomData() and any future dtype-branching builders. Kept as static readonly so tests can reference the exact contract.

    shape: number[] = ...
    chunkShape: number[] = ...
    dtype: string = '<f4'
    data: Uint8Array<ArrayBufferLike> | Float32Array<ArrayBufferLike> | null = null
    • Generate random data.

      [builders OOS3] Pre-fix dtype detection was dtype.includes('u1') || dtype.includes('uint8') — bare substring matching. This misclassified:

      • '<u16' (uint16) → was routed to the Uint8 branch (contains 'u1')
      • 'complex_uint8_v2' (any future dtype with 'uint8' embedded) → also routed to the Uint8 branch

      Now we match the exact set of supported uint8 dtype spellings. Zarr typed-dtype prefixes <, >, | denote byte order; 'uint8' is the numpy long form. Anything else falls through to the Float32 branch (the previous default).

      Returns this

    • Build the chunk metadata

      Returns {
          shape: number[];
          chunkShape: number[];
          dtype: string;
          data: Uint8Array<ArrayBufferLike> | Float32Array<ArrayBufferLike>;
          chunkGrid: number[];
      }