Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
correlation::render3d::MiniPlotRenderer Class Reference

High-performance 2D software renderer for distribution mini-charts. More...

#include <MiniPlotRenderer.hpp>

Static Public Member Functions

static PlotImageBuffer render (const analysis::MetricCurveData &metric_data, std::optional< std::size_t > frame_idx, uint32_t width, uint32_t height)
 Renders a 2D mini distribution plot into an RGBA pixel buffer with default configuration.
static PlotImageBuffer render (const analysis::MetricCurveData &metric_data, std::optional< std::size_t > frame_idx=std::nullopt, const MiniPlotConfig &config=MiniPlotConfig(), uint32_t width=K_DEFAULT_WIDTH, uint32_t height=K_DEFAULT_HEIGHT)
 Renders a 2D mini distribution plot into an RGBA pixel buffer with custom configuration.
static PeakInfo findPeak (std::span< const real_t > bins, std::span< const real_t > values) noexcept
 Finds the primary local maximum peak in a 1D curve.

Static Public Attributes

static constexpr uint32_t K_DEFAULT_WIDTH = 260
 Default canvas width (px).
static constexpr uint32_t K_DEFAULT_HEIGHT = 130
 Default canvas height (px).

Detailed Description

High-performance 2D software renderer for distribution mini-charts.

Employs zero-allocation drawing routines to produce anti-aliased distribution curves, overlays of current-frame vs ensemble mean, and peak markers in sub-millisecond execution.

Member Function Documentation

◆ findPeak()

PeakInfo correlation::render3d::MiniPlotRenderer::findPeak ( std::span< const real_t > bins,
std::span< const real_t > values )
staticnodiscardnoexcept

Finds the primary local maximum peak in a 1D curve.

Parameters
[in]binsX coordinates.
[in]valuesY coordinates.
Returns
Detected PeakInfo.
Here is the caller graph for this function:

◆ render() [1/2]

PlotImageBuffer correlation::render3d::MiniPlotRenderer::render ( const analysis::MetricCurveData & metric_data,
std::optional< std::size_t > frame_idx,
uint32_t width,
uint32_t height )
inlinestaticnodiscard

Renders a 2D mini distribution plot into an RGBA pixel buffer with default configuration.

Parameters
[in]metric_dataMetric dataset containing bins, mean curve, and per-frame curves.
[in]frame_idxOptional frame index to render on top of the mean.
[in]widthTarget canvas width in pixels.
[in]heightTarget canvas height in pixels.
Returns
Generated PlotImageBuffer suitable for conversion to slint::SharedPixelBuffer.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render() [2/2]

PlotImageBuffer correlation::render3d::MiniPlotRenderer::render ( const analysis::MetricCurveData & metric_data,
std::optional< std::size_t > frame_idx = std::nullopt,
const MiniPlotConfig & config = MiniPlotConfig(),
uint32_t width = K_DEFAULT_WIDTH,
uint32_t height = K_DEFAULT_HEIGHT )
staticnodiscard

Renders a 2D mini distribution plot into an RGBA pixel buffer with custom configuration.

Parameters
[in]metric_dataMetric dataset containing bins, mean curve, and per-frame curves.
[in]frame_idxOptional frame index to render on top of the mean.
[in]configCustom mini plot bounds and scale configuration.
[in]widthTarget canvas width in pixels.
[in]heightTarget canvas height in pixels.
Returns
Generated PlotImageBuffer suitable for conversion to slint::SharedPixelBuffer.
Here is the call graph for this function:

Member Data Documentation

◆ K_DEFAULT_HEIGHT

uint32_t correlation::render3d::MiniPlotRenderer::K_DEFAULT_HEIGHT = 130
staticconstexpr

Default canvas height (px).

◆ K_DEFAULT_WIDTH

uint32_t correlation::render3d::MiniPlotRenderer::K_DEFAULT_WIDTH = 260
staticconstexpr

Default canvas width (px).


The documentation for this class was generated from the following files: