work on igor note

This commit is contained in:
2026-03-28 18:48:25 -07:00
parent ce74cf0a3e
commit 559b1ae09a
26 changed files with 166 additions and 109 deletions

View File

@@ -45,8 +45,20 @@ class PreviewImage:
input=None,
colormap_map=None,
) -> tuple:
field = input if isinstance(input, DataField) else None
image = None if field is not None else input
if isinstance(input, DataField):
field = input
image = None
elif isinstance(input, np.ndarray):
field = None
image = input
elif input is not None:
raise TypeError(
f"Preview expects an IMAGE or DATA_FIELD — got {type(input).__name__}. "
"Check that you are connected to the DATA_FIELD output, not the path socket."
)
else:
field = None
image = None
resolved_colormap = resolve_colormap_input(
colormap,