Skip to content

RFC: show vectorscope along with waveform (or histogram)#20337

Draft
dtorop wants to merge 1 commit intodarktable-org:masterfrom
dtorop:vectorscope-separate
Draft

RFC: show vectorscope along with waveform (or histogram)#20337
dtorop wants to merge 1 commit intodarktable-org:masterfrom
dtorop:vectorscope-separate

Conversation

@dtorop
Copy link
Contributor

@dtorop dtorop commented Feb 13, 2026

There are two sorts of scopes:

  • Histogram and waveform primarily show per-channel lightness information.
  • Vectorscope shows chromaticity information without regard to lightness.

A long-time request has been to show both at once. That allows for a sense of both the lightness and chromaticity of an image without flipping between scopes.

Here's a few ideas on how to implement this. I'd be most interested in thoughts.

Plan A: Separate out vectorscope into its own utility module

This draft PR is one way to handle this: It makes a new "vectorscope" module contains the vectorscope-related code which was previously in the histogram (aka "scopes") module. The new vectorscope module can be displayed along with the existing histogram/waveform module. For example:

vectorscope_with_waveform_above

Advantages:

  • Can see vectorscope and waveform at once.
  • Can turn scopes modules on/off via standard keyboard shortcuts, without having to hand-program shortcut keys.

Disadvantages:

  • Can only hide/show vectorscope (or histogram/waveform) via keyboard shortcuts. This is not that discoverable compared to the scope-switching via buttons in the GUI, as now. (And also I'm using shift-ctrl-V as the vectorscope show/hide hotkey, which is also used for "thumbtable/paste history parts".)
  • Takes up a lot of vertical space (note that I've turned off the navigation module and moved the scopes modules to the left panel in the above screenshot to make the best of a small screen).
  • The vectorscope, being circular, has quite a bit of empty space on either side of it, unless it is sized quite large vertically or the panel is sized quite small horizontally.
  • Boilerplate GUI code gets repeated between libs/histogram.c and the new libs/vectorscope.c.
  • I haven't tested this draft PR with the tether module, things may break there (or elsewhere).

Plan B: Make the scopes module be able to split into two panes

The scopes module currently shows one scope (e.g. histogram only), and has buttons to flip between scopes. Instead, allow splitting the scopes module via the GUI in order to show a second scope on its right half. For example, control-clicking the icon of a scope might open a second pane on the right to display that scope.

Here is a mockup:

vectorscope_mockup_waveform_side_by_side

Advantages:

  • Gives more vertical space for other modules.
  • Doesn't have empty horizontal space on either side of the vectorscope.

Disadvantage:

  • The scopes module need some special-purpose GUI code to allow for showing two panes. This is a whole other paradigm on top of the currently utility modules GUI code.
  • A bit more intricate to code, hence that's only a mock-up image.
  • The non-vectorscope module (waveform in the above mockup) is a bit squashed, horizontally.
  • Is there any case in which a user would want to see anything else besides a waveform and vectorscope side-by-side?

This could be an opportunity for some refactoring:

  • Move the waveform & vectorscope processing math into separate files (as currently with histogram math in common/histogram.[ch]).
  • Move the histogram, waveform & vectorscope GUI code into separate files which are loadable/pluggable into the scopes utility module.

Plan C: As with Plan B, but only waverform/vectorscope split possible

Add an additional mode for the scopes module which implements just a waveform/vectorscope split. This would be a fifth button in the upper left of the scopes module (in addition to vectorscope, waveform, RGB parade, and histogram).

Advantages:

  • This is the most useful case for showing two scopes. Maybe the only useful case.
  • This simplifies things compared to adding generic side-by-side code to the scopes module.

Disadvantages:

  • As with plan B, the waveform module will be a bit squashed.
  • Doesn't help the unusual user who wants, say, to see RGB parade and histogram side-by-side.
  • Yet more intricate special case code in an already quite full scopes module.

Plan D: As with Plan A, but vectorscope and histogram/waveform can expand/collapse like other utility modules

vectorscope_with_expanders_crop

As with this PR, but make the scopes modules be expandable (like history, duplicates, masks).

Advantages:

  • Can collapse/expand scopes without needing to know hot keys.
  • Can reposition scopes easily via GUI.
  • Can hide/show via the GUI menu, just as can hide/show other utility modules.
  • Scopes are not a special case for the GUI, but like most other utility modules. Navigator is left as the only special case utility module.

Disadvantages:

  • The expanders at the top of each module will use up some vertical space. It might be possible to do some clever CSS and make the expander sit inside the module widget, and only appear on mouseover.

Plan E: Leave things as is

vectorscope_as_now

Users who are interested in seeing both the waveform and vectorscope can set up a shortcut to switch between these, or use the buttons in the GUI. It's awkward, but saves screen space.

There are two sorts of scopes:

- Histogram and waveform primarily show per-channel lightness
  information.
- Vectorscope shows chromaticity information without regard to
  lightness.

A long-time request has been to show both at once. That way it is
possible quickly to get a sense of both the lightness and chromaticity
of an image without flipping between scopes.

This commit is one way to handle this: It makes a new "vectorscope"
module which will only show vectorscope. The new module can be
displayed along with the existing histogram/waveform module.
@MStraeten
Copy link
Collaborator

From the perspective of efficient use of GUI real estate, Plan B is the most appealing.

@ralfbrown
Copy link
Collaborator

Ignoring ease-of-implementation issues, I'd put B and C tied for first place. Taking implementation into account, I vote for C, then D.

For useful combinations, I'd say only vectorscope+waveform and vectorscope+RGBparade, though I could conceive of someone wanting histogram plus one of the others. Waveform plus parade is just plain silly.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants