🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

trame-image-tools

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trame-image-tools

A trame package to display, manipulate, and select regions in images.

1.0.1
PyPI
Maintainers
3

trame-image-tools

A set of trame widgets to create a zoom and pan 2D image environment that includes interactive area selection widgets.

demo_image

Install

pip install trame-image-tools

Usage

from trame_image_tools.widgets import (
    TrameImage,
    TrameImageRoi,
    TrameImageLine,
    TrameImageCircle,
    TrameImagePolygon,
    TrameImageGrid,
)

with TrameImage(
    src="https://www.kitware.com/main/wp-content/uploads/2023/10/logo-trame.png",
    size=("size", [800, 210]),
):
    TrameImageGrid(
        spacing=("grid_spacing", [50, 25]),  # [x_tick_spacing, y_tick_spacing]
    )

    TrameImageLine(
        v_model=("line", [200, 50, 300, 150]),  # [x0, y0, x1, y1, ...]
    )

    TrameImageRoi(
        v_model=("roi", [350, 50, 100, 100]),  # [x, y, width, height]
    )

    TrameImageCircle(
        v_model=("circle", [550, 100, 50]),  # [x, y, radius]
    )

    TrameImagePolygon(
        v_model=("polygon", [650, 90, 670, 150, 730, 150, 750, 90, 700, 50]),  # [x0, y0, x1, y1, ...]
    )

Keywords

Python

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts