From 48d4de448500282c9753cc86f052f818731ec09d Mon Sep 17 00:00:00 2001 From: William Moore Date: Thu, 1 Feb 2024 12:27:05 +0000 Subject: [PATCH] Show Image, Dataset and Project in a table --- src/omero/gateway/__init__.py | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/omero/gateway/__init__.py b/src/omero/gateway/__init__.py index dba2de6be..0e3057b9a 100644 --- a/src/omero/gateway/__init__.py +++ b/src/omero/gateway/__init__.py @@ -10451,18 +10451,21 @@ def _repr_html_(self): """ + def obj_html(obj, otype): + return f""" + {otype} + {obj.id if obj else ""} + {obj.name if obj else ""} + + """ + # create a sub-table for image information table_imageinfo = f""" - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n +
Image name: {self.getName()}
Image ID: {self.getId()}
Project ID: {self.getProject().getId()}
+ + {obj_html(self, 'Image')} + {obj_html(self.getParent(), 'Dataset')} + {obj_html(self.getProject(), 'Project')}
IDName
"""