Page 1 of 1

the total number of images Omero

PostPosted: Thu Jan 17, 2019 1:37 pm
by sameh
Hello everyone ,

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

thank you so much

Best regards

Re: the total number of images Omero

PostPosted: Thu Jan 17, 2019 2:21 pm
by mtbc
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

Re: the total number of images Omero

PostPosted: Thu Jan 17, 2019 3:45 pm
by sameh
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

Re: the total number of images Omero

PostPosted: Thu Jan 17, 2019 6:18 pm
by jmoore
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