Cytomine-ULiege / Cytomine-Web-UI

Cytomine-Web-UI is the graphical user interface for Cytomine. Our fork includes R&D experimental features. See @cytomine for official releases.
Apache License 2.0
5 stars 3 forks source link

Redesign Color Manipulation panel #9

Closed urubens closed 2 years ago

urubens commented 2 years ago

This PR completely redesigns the Color Manipulation panel in the viewer, from scratch. The tabs are forsaken for a table with collapsible details.

Each row represents a channel (color, name, current min/max intensities) and can be expanded to see the histogram and adjust the channel's lookup table (brightness & contrast, gamma, invert).

The number of rows is the number of apparentChannels which is computed as channels * samplePerPixel, such that internal arrangement of channels in the image are hidden to the end-user:

Apparent channel visibility can be set from the Color Manipulation panel, and visibility is synchronized with the channel selector in the Image Controls. As Image Controls deals with slices and channels and has no notion of apparent channels, particular attention is put on handling chunky RGB images so that it's possible to show only 1 or 2 RGB channels from the Color Manipulation channel without causing issue in the Image Controls.

Channel color can be changed on the fly with a color picker. The original channel color is always the first color in the presets of the color picker.

Channels can be filtered by name. It has no influence on the visibility or not of the channel in the viewer, to be consistent with other panels behavior.

To limit amount of information and buttons, intensity adjustment is now either by min/max with bounds on a single slider either by brightness & contrast. To toggle between the two modes, there is a settings dropdown at top-right. This setting dropdown also inherits the linear/log histogram scale setting, which was overstated before.

Auto adjust and reset can now be done on a per-channel basis, and as before, for all channels at once.