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
| Property | Type | Default | Description |
|---|---|---|---|
showCursorCross | boolean | false | Show a crosshair at the cursor position in the full-screen view |
display | Ve.EImageDisplay | Auto | How the image is displayed (e.g. Auto, Rgb, Grayscale) |
normalize | Ve.EImageNormalize | Auto | Normalization mode (Auto, None, Manual) |
normalizeMin | number | 0 | Lower bound for manual normalization |
normalizeMax | number | 255 | Upper bound for manual normalization |
opacity | number | 1 | Image 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,
});