Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move repr_html to _ImageWrapper #429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/omero/gateway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,6 @@ def __init__(self, conn=None, obj=None, cache=None, **kwargs):
self._conn.SERVICE_OPTS)
self.__prepare__(**kwargs)

def _repr_html_(self):
"""
Returns an HTML representation of the object. This is used by the
IPython notebook to display the object in a cell.
"""
return image_to_html(self)

def __eq__(self, a):
"""
Returns true if the object is of the same type and has same id and name
Expand Down Expand Up @@ -8136,6 +8129,13 @@ def getInstrument(self):
i = self._obj.instrument = meta_serv.loadInstrument(i.id.val, ctx)
return InstrumentWrapper(self._conn, i)

def _repr_html_(self):
"""
Returns an HTML representation of the object. This is used by the
IPython notebook to display the object in a cell.
"""
return image_to_html(self)

def _loadPixels(self):
"""
Checks that pixels are loaded
Expand Down