@imfusion/web-ui 0.11.1-dev.73.g65836a33 → 0.11.1-dev.74.g7422f7b2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  import { t as e } from "../meta-V_KyLeGn.js";
2
- import { a as t, i as n, o as r, t as i } from "../slider-CpIZMAFl.js";
3
- import { t as a } from "../separator-BV2TR8U0.js";
2
+ import { a as t, n, o as r, s as i, t as a } from "../separator-BxUMVvFE.js";
4
3
  import { cva as o } from "class-variance-authority";
5
4
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
6
5
  import { useEffect as u, useMemo as d, useState as f } from "react";
@@ -28,7 +27,7 @@ function g({ focus: e, count: o, onFocusChange: s, orientation: u = "horizontal"
28
27
  ...y,
29
28
  ...g
30
29
  },
31
- children: [/* @__PURE__ */ c(n, {
30
+ children: [/* @__PURE__ */ c(t, {
32
31
  className: m.slider,
33
32
  variant: "position",
34
33
  orientation: u,
@@ -39,7 +38,7 @@ function g({ focus: e, count: o, onFocusChange: s, orientation: u = "horizontal"
39
38
  onValueChange: (e) => {
40
39
  s((typeof e == "number" ? e : e[0]) - 1);
41
40
  },
42
- children: /* @__PURE__ */ c(i, { children: /* @__PURE__ */ c(r, { children: /* @__PURE__ */ c(t, {
41
+ children: /* @__PURE__ */ c(n, { children: /* @__PURE__ */ c(i, { children: /* @__PURE__ */ c(r, {
43
42
  "aria-label": d,
44
43
  getAriaValueText: (e, t) => `${String(t)} of ${String(o)}`
45
44
  }) }) })
@@ -1,4 +1,4 @@
1
- import { ChangeHandler, IntensityRange, Options, Ranges, Variant } from './image-display-options-view.utils';
1
+ import { ChangeHandler, Dimension, IntensityRange, Options, Ranges, Variant } from './image-display-options-view.utils';
2
2
  type ImageDisplayOptionsViewProps = React.ComponentProps<"div"> & {
3
3
  variant?: Variant;
4
4
  /** Current option values for both dimensions. */
@@ -7,15 +7,21 @@ type ImageDisplayOptionsViewProps = React.ComponentProps<"div"> & {
7
7
  intensityRange: IntensityRange;
8
8
  /** Optional per-slider bound overrides, merged over the derived defaults. */
9
9
  ranges?: Ranges;
10
+ /** Show the 2D Gamma slider. */
11
+ withGamma?: boolean;
10
12
  /** Called with the dimension and the changed subset when a control moves. */
11
13
  onOptionsChange: ChangeHandler;
14
+ /** Called when the AutoWindow button is clicked */
15
+ onAutoWindow: () => void;
16
+ /** Called when the Transfer Function Preset is changed */
17
+ onTransferFunctionPresetChanged: (dim: Dimension, presetName: string) => void;
12
18
  };
13
19
  /**
14
20
  * ImageDisplayOptionsView - the SDK-free presentational surface behind
15
21
  * `ImageDisplayOptions`: the same controls, driven by plain props instead of
16
22
  * live SDK handles.
17
23
  */
18
- export declare function ImageDisplayOptionsView({ variant, options, intensityRange, ranges, onOptionsChange, className, ...props }: ImageDisplayOptionsViewProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare function ImageDisplayOptionsView({ variant, options, intensityRange, ranges, withGamma, onOptionsChange, onAutoWindow, onTransferFunctionPresetChanged, className, ...props }: ImageDisplayOptionsViewProps): import("react/jsx-runtime").JSX.Element;
19
25
  export declare namespace ImageDisplayOptionsView {
20
26
  var displayName: string;
21
27
  }
@@ -2,10 +2,14 @@ import { DisplayOptions2d, DisplayOptions3d, SharedImageSet } from '@imfusion/sd
2
2
  export type Variant = "default" | "horizontal" | "horizontal-compact";
3
3
  export type Dimension = "2d" | "3d";
4
4
  type Options2d = Pick<DisplayOptions2d, "window" | "level" | "gamma" | "invert">;
5
- type Options3d = Pick<DisplayOptions3d, "window" | "level" | "invert">;
5
+ type Options3d = Pick<DisplayOptions3d, "window" | "level">;
6
+ type TransferFunctionOptions = {
7
+ currentPreset: string | null;
8
+ presetNames: string[];
9
+ };
6
10
  export type Options = {
7
- "2d": Options2d;
8
- "3d": Options3d;
11
+ "2d": Options2d & TransferFunctionOptions;
12
+ "3d": Options3d & TransferFunctionOptions;
9
13
  };
10
14
  /** Dataset intensity range `[min, max]` in the original pixel domain. */
11
15
  export type IntensityRange = Readonly<ReturnType<SharedImageSet["minmaxIntensityOriginal"]>>;
@@ -15,6 +15,10 @@ type Props = React.ComponentProps<"div"> & {
15
15
  * Merged over the defaults, which are driven from the dataset's intensity domain.
16
16
  */
17
17
  ranges?: Ranges;
18
+ /**
19
+ * Show the 2D Gamma slider.
20
+ */
21
+ withGamma?: boolean;
18
22
  };
19
23
  /**
20
24
  * ImageDisplayOptions - a panel or toolbar of controls bound to an image
@@ -22,7 +26,7 @@ type Props = React.ComponentProps<"div"> & {
22
26
  *
23
27
  * Must render inside an `ImFusionProvider`.
24
28
  */
25
- export declare function ImageDisplayOptions({ data, variant, ranges, ...props }: Props): import("react/jsx-runtime").JSX.Element;
29
+ export declare function ImageDisplayOptions({ data, variant, ranges, withGamma, ...props }: Props): import("react/jsx-runtime").JSX.Element;
26
30
  export declare namespace ImageDisplayOptions {
27
31
  var displayName: string;
28
32
  }