deduplication pass

This commit is contained in:
2026-04-03 18:19:08 -07:00
parent f6b47e6d79
commit c8d766677b
42 changed files with 484 additions and 689 deletions

View File

@@ -86,7 +86,7 @@ class Annotations:
context = _annotation_context_from_image(input)
if context is None:
self._send_warning(
emit_warning(
"Annotations image input has no scale metadata, so scale bar and color-map legend cannot be added."
)
return (ImageData(image_to_uint8(input)),)
@@ -111,7 +111,7 @@ class Annotations:
if not (has_legend_values and str(context.get("legend_unit", "")).strip()):
missing_features.append("color-map legend")
if missing_features:
self._send_warning(
emit_warning(
f"Annotations image input is missing metadata for: {', '.join(missing_features)}."
)
annotated = _apply_annotation_overlay_from_context(
@@ -120,6 +120,3 @@ class Annotations:
annotation_spec,
)
return (ImageData(annotated, metadata={"annotation_context": context}),)
def _send_warning(self, message: str):
emit_warning(message)