Skip to main content

Display Config

The display config controls how the image is rendered — normalization mode, display mode, opacity, and the cursor cross overlay.

setConfig()

Applies a new display configuration.

setConfig(config: IDisplayConfig): Promise<void>;

This call is a no-op if the new config is deeply equal to the current one, so it is safe to call it on every cycle without causing unnecessary re-renders.

Automatic normalization defaults: If you switch normalize to Manual and there is already an image loaded, the controller automatically computes sensible normalizeMin / normalizeMax defaults from the pixel format range of the current image. You do not need to set them manually when first enabling manual mode.

getConfig()

Returns the current display configuration.

getConfig(): IDisplayConfig;

resetConfig()

Resets the display configuration to the built-in defaults.

resetConfig(): Promise<void>;

IDisplayConfig reference

PropertyTypeDefaultDescription
showCursorCrossbooleanfalseShow a crosshair at the cursor position in the full-screen view
displayVe.EImageDisplayAutoHow the image is displayed (e.g. Auto, Rgb, Grayscale)
normalizeVe.EImageNormalizeAutoNormalization mode (Auto, None, Manual)
normalizeMinnumber0Lower bound for manual normalization
normalizeMaxnumber255Upper bound for manual normalization
opacitynumber1Image opacity from 0 (transparent) to 1 (fully opaque)
var ctrl = Visu.page0.display1.getController();
await ctrl.setConfig({
showCursorCross: true,
display: Ve.EImageDisplay.Grayscale,
normalize: Ve.EImageNormalize.Manual,
normalizeMin: 0,
normalizeMax: 4095,
opacity: 1,
});