Homesplat-transform API Reference - v3.0.0
    Preparing search index...

    Function computeStats

    • Compute per-LOD, per-column statistics for splat data in a single streaming pass — exact min/max/mean/stdDev/NaN/Inf, an approximate median, and a 16-bin histogram per column, in columnar form (see SourceStats).

      Accepts either a ChunkSource (read chunk-by-chunk, constant memory) or a legacy DataTable (bridged transiently; yields a single LOD). Values are the raw, unbaked values — any pending transform is not applied.

      Parameters

      • input: DataTable | ChunkSource

        The source or table to analyze (left unchanged).

      • Optionalpool: ChunkDataPool

        Optional pool for the temporary read buffers; defaults to a fresh pool.

      Returns Promise<SourceStats>

      The per-LOD statistics.

      const stats = await computeStats(dataTable);
      const { columns, mean } = stats.lods[0];
      console.log(mean[columns.indexOf('opacity')]);