-
Notifications
You must be signed in to change notification settings - Fork 31
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
Export to omero #210
Export to omero #210
Conversation
|
Ah, yes, I needed to update the script on eel.... Done now, and seems to be working. |
Did some initial tests the creation works fine |
@jburel If none of the images from the figure are in a Dataset then new image will simply be an orphan. I'm not sure there's a better way to handle that, but an orphaned image is not a major problem. I mostly assume people aren't using HCS images to make figures, and also the 'export to OMERO' is mostly meant for showing your figure alongside the images in a Dataset, so HCS users can't do that anyway. |
Since we only use numpy for OMERO export, this means the script can still be used for other export if we happen to be missing numpy
Improved new image description. If the figure is saved, description will have a link to the figure, so you can find the figure from the image. |
@@ -60,6 +60,11 @@ | |||
logger.error("Reportlab not installed. See" |
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.
The message should be reviewed since we no longer recommend to install from pypi
@@ -60,6 +60,11 @@ | |||
logger.error("Reportlab not installed. See" | |||
" https://pypi.python.org/pypi/reportlab/") | |||
|
|||
try: |
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.
unlike since it is a dependency we already have for omero
self.save_figure() | ||
|
||
# PDF will get created in this group | ||
if group_id is None: | ||
group_id = self.conn.getEventContext().groupId | ||
self.conn.SERVICE_OPTS.setOmeroGroup(group_id) | ||
|
||
file_ann = self.create_file_annotation(image_ids) |
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.
no real to assign file_ann can do return self.create_file_annotation(image_ids)
|
||
def save_page(self, page=None): | ||
""" | ||
Save the current PIL image page as a new OMERO images and start a new |
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.
new OMERO image no s
@@ -1616,7 +1697,8 @@ def run_script(): | |||
""" | |||
|
|||
export_options = [rstring('PDF'), rstring('PDF_IMAGES'), | |||
rstring('TIFF'), rstring('TIFF_IMAGES')] | |||
rstring('TIFF'), rstring('TIFF_IMAGES'), | |||
rstring('OMERO')] |
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.
better to be explicit in the option i.e. OMERO_IMAGES
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.
For the others PDF_IMAGES/ TIFF_IMAGES
means create a zip file with the Figure as a PDF/TIFF and include all the rendered images in the figure as TIFFs (so you have a record of how the figure was created on export and you can use them to tweak the figure later). We don't need to support the equivalent option for export to OMERO.
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.
it was just to be more explicit
@@ -758,6 +759,11 @@ <h4 class="modal-title">Open</h4> | |||
<span class="glyphicon glyphicon-ok" style="color:#333; visibility:hidden"></span> | |||
TIFF with images</a> | |||
</li> | |||
<li><a href="#" data-export-option="to OMERO" | |||
title="Export as an Image in OMERO"> |
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.
Image(s)
Export of figure with multiple pages generates as expected the corresponding number of images in OMERO The color of the button during the generation is modified, but having a spinner will be clearer in general since the generation could take some time |
This reverts commit 2309f90.
@jburel Addressed those suggestions. |
I can look into showing a spinner during export, but I wouldn't want it to hold up this PR since it's not related to this PR and this PR is conflicting with #211 |
I will not do that in that PR. I will add a card on the priorities board |
looks better thanks |
Allows export of a figure as new OMERO Images (one per page).
This is a preliminary part of https://trello.com/c/qqpED5kE/129-export-as-movie
To test:
NB: I'll need to upload the figure export script before this is tested...