ui composes Prism widgets, routes user interaction, and presents processed images and inspection data.
It consumes structured/core state and should not embed OCIO processing logic.
main_window.pycompare_view.pyview_math.pycontext_variables_panel.pycontext_variables_dock.pylut_inspector/window.pylut_inspector/plot_widget.pylut_inspector/volume_widget.pyscopes/waveform_window.pyscopes/waveform_plot_widget.py
- Owns top-level app window composition and menu actions.
- Owns canonical UI-facing state orchestration:
- compare mode selection (
Split,Wipe,Full (A),Full (B),Diff) - per-side (A/B) source + transform state
- frame stepping controls
- OCIO config selection and transform parameter controls
- OCIO context variable state updates from dock panel
- compare mode selection (
- Triggers refresh/reprocess flow after relevant state edits.
- Maintains inspection HUD fields (resolution/coords/source/channel values).
- Renders compare modes (
splitrouting in main window, pluswipe,full_a,full_b,diffdraw paths). - Handles interaction:
- wipe divider dragging
- wipe divider rotation handles
- pan/zoom interaction
- side-aware interaction routing from cursor position
- hover coordinate emission for inspector/HUD
- Applies configurable viewport background color.
- Shared geometry utilities for zoom/pan and coordinate conversion.
- Keeps mapping logic reusable/testable outside widget handlers.
- UI editor for OCIO context variables (
QLabel+QLineEditrows). - Emits
context_values_changedoneditingFinished. - Supports empty states for no-config and no-variable cases.
QDockWidgetwrapper for panel integration intoViewmenu.- Provides floating/toggleable panel behavior.
- Modeless LUT utility window opened from
View -> LUT Inspection. - Handles LUT file drag/drop and optional browse-file selection.
- Orchestrates LUT loading via
io.lut.loaderand routes parsed data to the curve and volume widgets. - Presents
CurvesandVolumetabs. - Hosts Volume controls for projection mode, point-position mode, and neutral-axis visibility.
- Formats summary metrics produced by
core.lut.analysis, including sample count, channel count, output min/max, out-of-range state, monotonicity, and CSP shaper state when present. - Reports load status/error feedback to the user.
- For
.cubefiles, expects scalar-equivalent RGB domains (DOMAIN_MINandDOMAIN_MAXcomponents must match per row); mixed per-channel domain components are treated as unsupported and surfaced as load errors. - Does not present Colour/Delta E metrics until the Inspector has an explicit colourspace/comparison assumption to show to the user.
- Renders scalable X/Y LUT transfer curves.
- Draws axes/grid and per-channel curve overlays (RGB when present).
- Renders only the
LutPlotDatacurves supplied by the loader; it does not own parsing, summary analysis, interpolation, or colour science decisions. - Resizes with its parent inspection window.
- Renders projected 3D LUT volume previews as a QPainter point cloud.
- Supports projection modes:
RGB isometricRG planeRB planeGB plane
- Supports point positions from transformed output RGB values or the original input lattice.
- Draws plane-axis letters for direct channel projections.
- Draws an optional neutral-axis overlay based on the input grayscale diagonal.
- Keeps rendering bounded through the projection sample limit reported in the widget status text.
- Consumes projected data from
core.lut.volume_projection; it does not parse LUT files or own sampling rules.
- Modeless waveform utility window opened from
View -> Waveform Monitor. - Supports local scope modes:
A,B,A|B(side-by-side). - Supports explicit
BT.709andBT.2020standards for the encodedY'trace. - Defaults to BT.709 and does not infer standards from arbitrary OCIO names.
- Does not auto-follow active side changes from compare mode.
- Consumes per-side float analysis buffers from main window and routes waveform data to plot widgets. Buffers are post-OCIO when a transform is active, but may be untransformed in bypass/incomplete-config paths.
- Analysis occurs before global exposure/luminance and channel-view presentation controls.
- Renders waveform density heatmaps for RGB channel overlays and encoded
Y'. - Uses SciPy Gaussian filtering with
sigma=(0.5, 0.5)on rendering copies. - Normalizes filtered R, G, B, and Y' together with one shared factor.
- Caches prepared densities per trace; signal-mode changes reuse the cache.
- Never mutates the raw density arrays in
WaveformTrace. - Displays empty-state text when no waveform trace is available.
- Resizes with parent window layout.
- User changes source/frame/colorspace/look/context/bypass state.
- Main window updates canonical panel/context state.
- Main window refreshes side display images through OCIO processing path.
- Compare/split widgets receive updated
QImagebuffers.
- Compare widgets emit normalized hover coordinates + side hint.
- Main window samples display buffers at hover UV.
- HUD labels update with resolution, pixel coords, selected source label, and channel values.
CompareViewemits:wipe_changedview_changedhover_changed
- Main window consumes these signals and synchronizes compare/view state.
- UI should call
core.ocio_processorthrough main-window orchestration, not inside lower-level widgets. - UI widgets should avoid owning canonical OCIO/config/source state.
- Complex logic should be delegated to reusable helpers (
view_math,core,io), keeping event handlers thin.