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

Merged
merged 12 commits into from Jun 13, 2017

Conversation

Projects
None yet
2 participants
@will-moore
Member

will-moore commented Apr 27, 2017

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:

  • Choose "New OMERO Image" from the export options drop-down menu
  • Export the figure... when done, should see a link to the new Image.
  • Image will be named according to figure name and have the figure legend as it's description (if legend exists).
  • Multi-page figures should create an Image per page, named ..._page_01 etc.

NB: I'll need to upload the figure export script before this is tested...

@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel Apr 28, 2017

Member
omero_api_IScript_ice.py", line 909, in runScript
    return _M_omero.api.IScript._op_runScript.invoke(self, ((scriptID, inputs, waitSecs), _ctx))
ValidationException: exception ::omero::ValidationException
{
    serverStackTrace = 
    serverExceptionClass = 
    message = Invalid parameters:
VALUE LIST for "Export_Option": OMERO not in ['PDF', 'PDF_IMAGES', 'TIFF', 'TIFF_IMAGES']
Member

jburel commented Apr 28, 2017

omero_api_IScript_ice.py", line 909, in runScript
    return _M_omero.api.IScript._op_runScript.invoke(self, ((scriptID, inputs, waitSecs), _ctx))
ValidationException: exception ::omero::ValidationException
{
    serverStackTrace = 
    serverExceptionClass = 
    message = Invalid parameters:
VALUE LIST for "Export_Option": OMERO not in ['PDF', 'PDF_IMAGES', 'TIFF', 'TIFF_IMAGES']
@will-moore

This comment has been minimized.

Show comment
Hide comment
@will-moore

will-moore Apr 28, 2017

Member

Ah, yes, I needed to update the script on eel.... Done now, and seems to be working.

Member

will-moore commented Apr 28, 2017

Ah, yes, I needed to update the script on eel.... Done now, and seems to be working.

@snoopycrimecop snoopycrimecop referenced this pull request Apr 30, 2017

Merged

Page colour #211

@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel May 1, 2017

Member

Did some initial tests the creation works fine
I have not tested yet the multi-pages situations,
Image from plate will always be orphaned, we should probably rethink that section

Member

jburel commented May 1, 2017

Did some initial tests the creation works fine
I have not tested yet the multi-pages situations,
Image from plate will always be orphaned, we should probably rethink that section

@will-moore

This comment has been minimized.

Show comment
Hide comment
@will-moore

will-moore May 2, 2017

Member

@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.

Member

will-moore commented May 2, 2017

@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.

will-moore added some commits May 2, 2017

Use try/except to import numpy
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
@will-moore

This comment has been minimized.

Show comment
Hide comment
@will-moore

will-moore May 2, 2017

Member

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.

Member

will-moore commented May 2, 2017

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.

Show outdated Hide outdated omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
Show outdated Hide outdated omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
Show outdated Hide outdated omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
Show outdated Hide outdated omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
@@ -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')]

This comment has been minimized.

@jburel

jburel May 3, 2017

Member

better to be explicit in the option i.e. OMERO_IMAGES

@jburel

jburel May 3, 2017

Member

better to be explicit in the option i.e. OMERO_IMAGES

This comment has been minimized.

@will-moore

will-moore May 3, 2017

Member

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.

@will-moore

will-moore May 3, 2017

Member

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.

This comment has been minimized.

@jburel

jburel May 3, 2017

Member

it was just to be more explicit

@jburel

jburel May 3, 2017

Member

it was just to be more explicit

Show outdated Hide outdated omero_figure/templates/figure/index.html
@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel May 3, 2017

Member

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

Member

jburel commented May 3, 2017

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

@will-moore

This comment has been minimized.

Show comment
Hide comment
@will-moore

will-moore May 3, 2017

Member

@jburel Addressed those suggestions.

Member

will-moore commented May 3, 2017

@jburel Addressed those suggestions.

@will-moore

This comment has been minimized.

Show comment
Hide comment
@will-moore

will-moore May 3, 2017

Member

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

Member

will-moore commented May 3, 2017

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

@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel May 3, 2017

Member

I will not do that in that PR. I will add a card on the priorities board

Member

jburel commented May 3, 2017

I will not do that in that PR. I will add a card on the priorities board

@will-moore

This comment has been minimized.

Show comment
Hide comment
@will-moore

will-moore May 3, 2017

Member

Ah, I just pushed a commit for that:
screen shot 2017-05-03 at 12 36 52

Member

will-moore commented May 3, 2017

Ah, I just pushed a commit for that:
screen shot 2017-05-03 at 12 36 52

@jburel

This comment has been minimized.

Show comment
Hide comment
@jburel

jburel May 3, 2017

Member

looks better thanks

Member

jburel commented May 3, 2017

looks better thanks

@will-moore

This comment has been minimized.

Show comment
Hide comment
@will-moore

will-moore May 9, 2017

Member

@jburel - If this can be merged I can fix and re-open #211, thanks.

Member

will-moore commented May 9, 2017

@jburel - If this can be merged I can fix and re-open #211, thanks.

@jburel jburel merged commit cb9299f into ome:master Jun 13, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jburel jburel added this to the 3.1.0 milestone Jun 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment