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 (seetheme.THEMES).Theme: custom theme, for example derived withDARK_THEME.replace(...).None: keep the native style of the platform.
- Raises:
ValueError – If
imagesandsessionare both provided.KeyError – If
themeis an unknown theme name.TypeError – If
themeis neither a string, aThemenorNone.
Notes
imagesandsessionare 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)