girder-large-image-annotation

raw JSON →
1.34.1 verified Sat May 09 auth: no python

A Girder plugin to store and display annotations on large, multiresolution images. Current version 1.34.1, requires Python >=3.10. Part of the large_image ecosystem; releases occur every few months with minor improvements and bug fixes.

pip install girder-large-image-annotation
error ModuleNotFoundError: No module named 'girder_large_image_annotation'
cause The installed package uses hyphens in the name but the import path is different. The package is a Girder plugin, not a regular module.
fix
Do not attempt to import directly. Enable the plugin in Girder configuration under 'plugins' list as 'large_image_annotation'.
error girder.plugins.loading.PluginLoadError: Plugin 'large_image_annotation' requires 'girder_large_image' to be loaded.
cause Missing dependency plugin 'girder-large-image' is not enabled.
fix
Enable 'girder_large_image' plugin before 'large_image_annotation' in your Girder configuration.
error pkg_resources.VersionConflict: (girder 2.x.x ...)
cause Incompatible with very old Girder versions (pre-3.0). The plugin supports Girder >=3.
fix
Upgrade Girder to version 3.x or later.
breaking girder-large-image-annotation v1.34.0 drops support for Python <3.10. Existing Python 3.8/3.9 deployments must upgrade Python or pin to an older version.
fix Upgrade to Python >=3.10 or use girder-large-image-annotation==1.33.5.
deprecated The old 'girder-annotation' plugin may conflict with this plugin. It is deprecated and should be uninstalled before installing girder-large-image-annotation.
fix Run 'pip uninstall girder-annotation' if it is installed.
gotcha The plugin must be loaded as a Girder plugin; it cannot be imported like a standard Python library. Running 'import girder_large_image_annotation' will fail.
fix Use Girder's plugin loading mechanism (e.g., add to girder config or use girder-client to enable).

Initialize Girder client and fetch annotations for a given item.

import os
from girder.client import GirderClient

client = GirderClient(apiUrl=os.environ.get('GIRDER_API_URL', 'http://localhost:8080/api/v1'))
client.authenticate(apiKey=os.environ.get('GIRDER_API_KEY', ''))

# Example: list annotations for an item
item_id = os.environ.get('ITEM_ID', '')
if item_id:
    annotations = client.get(f'annotation?itemId={item_id}')
    print(annotations)