erlab.interactive.imagetool.viewer_state

State and input parsing helpers for ImageTool viewer widgets.

Classes

ColorMapState

A dictionary containing the colormap state of an ImageSlicerArea instance.

GuidelineState

A dictionary containing the state of rotation guidelines.

ImageSlicerState

A dictionary containing the state of an ImageSlicerArea instance.

PlotItemState

A dictionary containing the state of a PlotItem instance.

class erlab.interactive.imagetool.viewer_state.ColorMapState[source]

Bases: TypedDict

A dictionary containing the colormap state of an ImageSlicerArea instance.

cmap: str | ColorMap
gamma: float
reverse: bool
high_contrast: bool
zero_centered: bool
levels_locked: bool
levels: NotRequired[tuple[float, float]]
class erlab.interactive.imagetool.viewer_state.GuidelineState[source]

Bases: TypedDict

A dictionary containing the state of rotation guidelines.

count: Literal[1, 2, 3]
angle: float
offset: tuple[float, float]
follow_cursor: bool
class erlab.interactive.imagetool.viewer_state.PlotItemState[source]

Bases: TypedDict

A dictionary containing the state of a PlotItem instance.

vb_aspect_locked: bool | float
vb_x_inverted: NotRequired[bool]
vb_y_inverted: NotRequired[bool]
vb_autorange: NotRequired[tuple[bool, bool]]
roi_states: NotRequired[list[dict[str, Any]]]
guideline_state: NotRequired[GuidelineState]
class erlab.interactive.imagetool.viewer_state.ImageSlicerState[source]

Bases: TypedDict

A dictionary containing the state of an ImageSlicerArea instance.

color: ColorMapState
slice: ArraySlicerState
current_cursor: int
manual_limits: dict[str, list[float]]
axis_inversions: typing.NotRequired[dict[str, bool]]
filter_operation: typing.NotRequired[dict[str, typing.Any] | None]
cursor_colors: list[str]
controls_visible: typing.NotRequired[bool]
file_path: typing.NotRequired[str | None]
load_func: typing.NotRequired[tuple[str, dict[str, typing.Any], _FileSelection] | None]
splitter_sizes: typing.NotRequired[list[list[int]]]
plotitem_states: typing.NotRequired[list[PlotItemState]]