pyclickimage.run#

pyclickimage.run(images: str | Path | Sequence[str | Path] | None = None, session: str | Path | None = None, theme: str | Theme | None = 'light') → None[source]#

Launch the ClickImageApp as a standalone application.

Parameters:
  • images (str, pathlib.Path or sequence, optional) – Image or list of images to preload.

  • session (str or pathlib.Path, optional) – CSV annotation session to load.

  • theme (str, Theme or None, default="light") –

    Visual theme of the application.

    • "dark" or "light": built-in theme (see theme.THEMES).

    • Theme: custom theme, for example derived with DARK_THEME.replace(...).

    • None: keep the native style of the platform.

Raises:
  • ValueError – If images and session are both provided.

  • KeyError – If theme is an unknown theme name.

  • TypeError – If theme is neither a string, a Theme nor None.

Notes

images and session are mutually exclusive. A session CSV already contains the image list and annotations.

The theme is applied to the whole application (style, palette, stylesheet) and to the custom-painted plots of the image tool (profiles, histogram, interpolation curve).

Examples

Launch with an empty application:

run()

Launch with images:

run("image.tif")

Launch with multiple images:

run(["image1.tif", "image2.tif"])

Load an existing session:

run(session="annotations.csv")

Use the dark theme:

run("image.tif", theme="dark")

Use a custom theme:

from pyclickimage.theme import DARK_THEME

run(theme=DARK_THEME.replace(accent="#3ecf8e"))

Keep the native style of the platform:

run(theme=None)