We're Hiring!

How to get the list of images in a dataset?

General user discussion about using the OMERO platform to its fullest. Please ask 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

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

How to get the list of images in a dataset?

Postby Kouichi_C_Nakamura » Wed Jul 18, 2018 10:11 pm

How can I get the list of images or image IDs in a dataset? My best bet is to use ContainerService.

I'm executing Java commands in MATLAB, so code may look a bit strange, but I thought something like below would work.

Code: Select all
cs = session.getContainerService;
imgs = cs.getImages('dataset',ds_id,[]);


However, as usual, it appears that the input arguments are in the wrong types. Documentation is not very helpful. https://downloads.openmicroscopy.org/om ... #getImages
Kouichi_C_Nakamura
 
Posts: 165
Joined: Thu Oct 19, 2017 1:35 pm

Re: How to get the list of images in a dataset?

Postby Dominik » Thu Jul 19, 2018 8:27 am

Hi,

here's an example:

Code: Select all
long datasetId = 123;
List<omero.model.Image> imgs = cs.getImages(omero.model.Dataset.class.getSimpleName(), Collections.singletonList(datasetId), null);
        for(omero.model.Image img : imgs)
            System.out.println(img.getId().getValue());


Yes the Ice Api documentation is quite cryptic. There's also the 'OMERO.blitz' documentation which can be more helpful with respect to the Java API: https://downloads.openmicroscopy.org/omero/5.4.6/api/ , but still it's not ideal. I have a look around, hope I can point you to the right location later.

Kind Regards,
Dominik
User avatar
Dominik
Team Member
 
Posts: 149
Joined: Mon Feb 10, 2014 11:26 am

Re: How to get the list of images in a dataset?

Postby Dominik » Thu Jul 19, 2018 10:43 am

There is also some MATLAB specific documentation here:
https://docs.openmicroscopy.org/omero/5 ... atlab.html

Regards,
Dominik
User avatar
Dominik
Team Member
 
Posts: 149
Joined: Mon Feb 10, 2014 11:26 am

Re: How to get the list of images in a dataset?

Postby Kouichi_C_Nakamura » Thu Jul 19, 2018 8:19 pm

Sorry, I should have looked more carefully. https://docs.openmicroscopy.org/omero/5 ... ading-data

This is the one I was looking for!

Code: Select all
datasetImages = getImages(session, 'dataset', datasetsIds)
Kouichi_C_Nakamura
 
Posts: 165
Joined: Thu Oct 19, 2017 1:35 pm

Re: How to get the list of images in a dataset?

Postby Kouichi_C_Nakamura » Fri Jul 20, 2018 3:19 pm

Yes the Ice Api documentation is quite cryptic.


This is something I'd never understand. Why on earth do people leave cryptic documentation? During the last a few months I spent days and nights wandering in ImageJ and OMERO API documentation, but generally, they're inconceivable. Usually, there is no example given. Data type of input arguments are usually given, but often it is not specific enough and it is hard to work out how to prepare them. Phew...
Kouichi_C_Nakamura
 
Posts: 165
Joined: Thu Oct 19, 2017 1:35 pm


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest