We're Hiring!

the total number of images Omero

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.

the total number of images Omero

Postby sameh » Thu Jan 17, 2019 1:37 pm

Hello everyone ,

Is there an Omero command to know the total number of images on omero?

thank you so much

Best regards
sameh
 
Posts: 29
Joined: Tue Apr 17, 2018 8:38 am

Re: the total number of images Omero

Postby mtbc » Thu Jan 17, 2019 2:21 pm

Code: Select all
bin/omero hql --all "SELECT COUNT(id) FROM Image"
counts all the images readable by the user. Administrative users can read all images.

Cheers,
Mark
User avatar
mtbc
Team Member
 
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland

Re: the total number of images Omero

Postby sameh » Thu Jan 17, 2019 3:45 pm

mtbc wrote:
Code: Select all
bin/omero hql --all "SELECT COUNT(id) FROM Image"
counts all the images readable by the user. Administrative users can read all images.

Cheers,
Mark


Great !!!
thank you so much

how can I change the syntax of the command to have the following information:
- the number of images per user
- the number of images per group
- the total number of users

In addition we tested this command:
./omero hql 'SELECT name, details.owner.firstName, details.owner.lastName FROM Image'

it allows us to have the last 25 images imported in the group by default, is it possible to display more than 25 images?

thanks again
sameh
 
Posts: 29
Joined: Tue Apr 17, 2018 8:38 am

Re: the total number of images Omero

Postby jmoore » Thu Jan 17, 2019 6:18 pm

sameh wrote:how can I change the syntax of the command to have the following information:
- the number of images per user
- the number of images per group
- the total number of users


Code: Select all
[jamoore@ome-c6100-1 dist]$ bin/omero hql -q --all "select e.omeName, count(i.id) from Image i join i.details.owner e group by e.omeName"
#  | Col1                                 | Col2
----+--------------------------------------+------
0  | 0019a932-5b7d-4a9e-a280-ccdbc1121af8 | 1
1  | 00300607-88a3-482b-934e-7d34fd5c7913 | 1
2  | 00b65edc-b04f-49a4-a3a2-67f5b20a9a80 | 1
...


Code: Select all
[jamoore@ome-c6100-1 dist]$ bin/omero hql -q --all "select g.name, count(i.id) from Image i join i.details.group g group by g.name"
#  | Col1                                 | Col2
----+--------------------------------------+------
0  | 0063221d-8696-4b44-a517-fbb57f836725 | 1
1  | 00dc08a8-1ec4-44c4-8694-6786c8f1da27 | 1
2  | 018de9d1-3a88-4020-b487-f3204b9bec0d | 2
3  | 01b8a4f8-87f6-4151-8f1d-7fa591fda00e | 1
...


Code: Select all
[jamoore@ome-c6100-1 dist]$ bin/omero hql -q --all "select count(e) from Experimenter e"
# | Col1
---+------
0 | 4435
(1 row)


You might also take a look at https://docs.openmicroscopy.org/omero/5.4.9/developers/GettingStarted.html#hql-examples

it allows us to have the last 25 images imported in the group by default, is it possible to display more than 25 images?


--limit=100 for example. See `-h` for more information.

~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest