-
Notifications
You must be signed in to change notification settings - Fork 32
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
added _repr_html_
method for _ImageWrapper
#394
Conversation
repr_html
method for _ImageWrapper
_repr_html_
method for _ImageWrapper
This looks good: You're missing Dataset info. You can get a Dataset with I had a go with this...
|
cc @pwalczysko @jburel - Any suggestions here? |
What about pixel type and ROIs (number of ROIs) ? |
@will-moore I think it'll make sense to reduce the precision on the displayed voxel dimensions. Should be an easy fix. I do like the idea about adding some basic information about the parent dataset
I think
Would you be interested in sending this as a PR to this PR? Also, just that I understand it correctly - the
I thought about ROIs but eventually refrained from adding it to restrict myself a bit to the parameters that would always be set for an image. But then again, there is still plenty of space in the table(s) 🤔 Edit: 1e40b2a should limit floating point precision to three decimals. Do you think that's enough? |
Opened PR with those changes at jo-mueller#1 |
Show Image, Dataset and Project in a table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks
Cool! Let me know if I should change anything - I probably won't have so much time to work on it because I'll be on leave for a few months soon 👍 |
@will-moore @pwalczysko is there anything I should add to this PR to see it through? Happy for any feedback 👍 |
Hi @jo-mueller - apologies for dropping this. Also, in order to accept external contributions to any of the OME's GPL repos, we need to ask that you fill out a CLA form and submit it as described at https://ome-contributing.readthedocs.io/en/latest/cla.html Thanks |
@will-moore thans for the reply - I sent the CLA form to the given address. Is the |
Thanks for the CLA. I would add the code to https://github.com/ome/omero-py/blob/master/src/omero/gateway/utils.py
Then add Then...
|
Done in da9d644 |
With an image which does have pixelsizes, I have success But with an image which does not have pixelsizes, I do get an error (image created by
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the image with no pixelsizes problem ^^^ thank you.
Hi @pwalczysko , thanks for the review, good catch! I added some code to escape this error if the properties haven't been set (b0a7fad). In this case, I would now get this - also shows that this is not a problem for orphaned images, i.e. if Dataset and Project are unspecified. |
Confirming the fix @jo-mueller Thank you |
Fixes #393
Description
This PR overwrites the
repr_html
for the_imageWrapper
class to show a html overview object in Jupyter Notebooks whenever anImageWrapper
object is sown in a cell. In essence, it creates an html object and fills it with some essential information about the image. Currently displayed:MICROMETER
- there is probably a way to add the units as µm or whatever it is set to).Let me know what else you would consider relevant or added/changed in the displayed object. I am by no means an html expert, so there is certainly some room for improvement there :)