Skip to main content

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

Project description

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, ...]
    )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trame_image_tools-1.0.2.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trame_image_tools-1.0.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file trame_image_tools-1.0.2.tar.gz.

File metadata

  • Download URL: trame_image_tools-1.0.2.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for trame_image_tools-1.0.2.tar.gz
Algorithm Hash digest
SHA256 c8899aadaf0d47c36367a9c6ad8ba00a606387c31f686d0d1e0f2482cee1aa14
MD5 bcc682e48043e9c8d4d6cd70859c0753
BLAKE2b-256 b3b59d0ad543287348e3ae905b9021123846f9c1fb44cce1023a305e6d53dd11

See more details on using hashes here.

Provenance

The following attestation bundles were made for trame_image_tools-1.0.2.tar.gz:

Publisher: test_and_release.yml on Kitware/trame-image-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file trame_image_tools-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for trame_image_tools-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eebcf0bb5b65ad9797f0c73ce765fd80408d537907c8f13e74e6858e59d9f5c4
MD5 139a24191a4f20740c193240e1db1bf6
BLAKE2b-256 c576ce0573e1703d3a4cc9e735eaedfadbfef2d7751a1d6a9bb5d3367250cfe6

See more details on using hashes here.

Provenance

The following attestation bundles were made for trame_image_tools-1.0.2-py3-none-any.whl:

Publisher: test_and_release.yml on Kitware/trame-image-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page