We're Hiring!

Export is not working in 4.1

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: Export is not working in 4.1

Postby cxallan » Mon Oct 19, 2009 10:54 am

ryan wrote:Thanks for the reply, Can you please give any example of a query showing how to retrieve all the images based on the project id, or dataset id ?
I want to download all these images into my system.


You can't export like that currently, as Jean-Marie has already said above. If you want to do that you'll have to write the code to do it in a batch starting with retrieving the images for a Project, for example:

Code: Select all
List<Long> projectIds = new ArrayList();
projectIds.add(1L);
Set images = gateway.getContainerImages(Project.class, projectIds, options);
...
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Export is not working in 4.1

Postby ryan » Mon Oct 19, 2009 11:02 am

Thanks a lot cxallan for your reply. After getting the images, how i can save them in to my hard disk ?
(In which format do we get them)
By the way, i forgot to ask you, how i can pass the selected project id, or dataset id in the query.
ryan
 
Posts: 18
Joined: Thu Oct 15, 2009 12:32 pm

Re: Export is not working in 4.1

Postby cxallan » Mon Oct 19, 2009 11:08 am

ryan wrote:Thanks a lot cxallan for your reply. After getting the images, how i can save them in to my hard disk ?
(In which format do we get them)
By the way, i forgot to ask you, how i can pass the selected project id, or dataset id in the query.


That does not get the images, it gets the Image objects from the server. You need to look at the following method in OMEROGateway for export as OME-TIFF:

Code: Select all
   synchronized File exportImageAsOMETiff(File f, long imageID)
      throws DSAccessException, DSOutOfServiceException
...


You pass the selected Project or Dataset ID as the node ID.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Export is not working in 4.1

Postby ryan » Mon Oct 19, 2009 11:23 am

It seems the present functionality exports only a single image, that is selected, to the "file" that is selected via FileChooser. But how to export all the images of a project? How to pass the selected project/dataset ?
It is not clear. Please throw some light.
ryan
 
Posts: 18
Joined: Thu Oct 15, 2009 12:32 pm

Re: Export is not working in 4.1

Postby cxallan » Mon Oct 19, 2009 11:29 am

ryan wrote:It seems the present functionality exports only a single image, that is selected, to the "file" that is selected via FileChooser. But how to export all the images of a project? How to pass the selected project/dataset ?
It is not clear. Please throw some light.


Correct. You cannot export all the images of a Project without writing your own code to find the Image IDs from a given Project and export each Image. This is what we have been trying to tell you how to do since you started the thread.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Export problem in 4.1

Postby ryan » Tue Oct 20, 2009 4:47 am

I got an error while exporting images. I have connected to an external Omero server. Whatever image i export, i get the error as: "Unable to export as OME-TIFF" in the dialog box. And i have few exceptions as well in java code, like:

org.openmicroscopy.shoola.env.data.DSAccessException: Cannot access data.
Cannot access Exporter service.

at org.openmicroscopy.shoola.env.data.OMEROGateway.handleException(OMEROGateway.java:456)
at org.openmicroscopy.shoola.env.data.OMEROGateway.getExporterService(OMEROGateway.java:1006)
at org.openmicroscopy.shoola.env.data.OMEROGateway.exportImageAsOMETiff(OMEROGateway.java:4873)

Though i get these errors, i see an image exported on my desktop. Why iam getting these errors ?
ryan
 
Posts: 18
Joined: Thu Oct 15, 2009 12:32 pm

Re: Export is not working in 4.1

Postby cxallan » Tue Oct 20, 2009 7:24 am

Which build of OMERO 4.1? Export in particular has had many changes over the last 10 days or so. Also, can we have the entire exception please?
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Export is not working in 4.1

Postby ryan » Tue Oct 20, 2009 7:54 am

Iam using Omero Insight 4.1.0 Beta.
This is the complete exception in the eclipse console, after i export an image:

org.openmicroscopy.shoola.env.data.DSAccessException: Cannot access data.
Cannot access Exporter service.
at org.openmicroscopy.shoola.env.data.OMEROGateway.handleException(OMEROGateway.java:456)
at org.openmicroscopy.shoola.env.data.OMEROGateway.getExporterService(OMEROGateway.java:1006)
at org.openmicroscopy.shoola.env.data.OMEROGateway.exportImageAsOMETiff(OMEROGateway.java:4873)
at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.exportImageAsOMETiff(OmeroImageServiceImpl.java:713)
at org.openmicroscopy.shoola.env.data.views.calls.ExportLoader$1.doCall(ExportLoader.java:76)
at org.openmicroscopy.shoola.env.data.views.BatchCall.doStep(BatchCall.java:145)
at org.openmicroscopy.shoola.util.concur.tasks.CompositeTask.doStep(CompositeTask.java:226)
at org.openmicroscopy.shoola.env.data.views.CompositeBatchCall.doStep(CompositeBatchCall.java:126)
at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.exec(ExecCommand.java:165)
at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.run(ExecCommand.java:274)
at org.openmicroscopy.shoola.util.concur.tasks.AsyncProcessor$Runner.run(AsyncProcessor.java:91)
at java.lang.Thread.run(Unknown Source)
Caused by: Ice.OperationNotExistException
id.name = "30f394f6-3565-4893-9ef8-91d34182ffe6"
id.category = "session-fcf4ee94-d2b6-462f-a323-5c208efaffb3"
facet = ""
operation = "createExporter"
at IceInternal.Outgoing.invoke(Outgoing.java:147)
at omero.api._ServiceFactoryDelM.createExporter(_ServiceFactoryDelM.java:227)
at omero.api.ServiceFactoryPrxHelper.createExporter(ServiceFactoryPrxHelper.java:286)
at omero.api.ServiceFactoryPrxHelper.createExporter(ServiceFactoryPrxHelper.java:258)
at org.openmicroscopy.shoola.env.data.OMEROGateway.getExporterService(OMEROGateway.java:1001)
... 10 more
ryan
 
Posts: 18
Joined: Thu Oct 15, 2009 12:32 pm

Re: Export is not working in 4.1

Postby cxallan » Tue Oct 20, 2009 8:05 am

Which version of the server? Export is only available using a Beta 4.1 server.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: Export is not working in 4.1

Postby ryan » Tue Oct 20, 2009 9:00 am

i hope iam using a 4.0 version of server.
ryan
 
Posts: 18
Joined: Thu Oct 15, 2009 12:32 pm

PreviousNext

Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest