Page 1 of 2

Ordering and OMERO

PostPosted: Wed Nov 17, 2010 3:54 pm
by icaoberg
I created a list using the following commands
Code: Select all
dataset = gateway.getDataset( did, True )
        images = dataset.linkedImageList()


now i noticed that whenever i get the list i get it in different order. is there a logic to this? is there a way to keep an ordering?

Re: Ordering and OMERO

PostPosted: Wed Nov 17, 2010 4:00 pm
by jmoore
Code: Select all
Dataset.imageLinks
is an unodered list, so in general no, there's no way to guarantee an ordering. If you'd prefer to use HQL, then you can use something like:
Code: Select all
select i from Dataset d join d.imageLinks dil join dil.child i where d.id = 1 order by i.name


Cheers,
~Josh.

Re: Ordering and OMERO

PostPosted: Wed Nov 17, 2010 4:34 pm
by icaoberg
Is there a way to create a dataset where the images are displayed in a certain order?

Re: Ordering and OMERO

PostPosted: Wed Nov 17, 2010 5:04 pm
by cxallan
The default sorting order for display in OMERO.insight and OMERO.web is image name. There is no special dataset that has an ordered list of images, if you want them to be ordered in a particular way you must make your query as such as Josh has outlined above.

Re: Ordering and OMERO

PostPosted: Wed Nov 17, 2010 5:32 pm
by icaoberg
we are performing some calculations that ranks images in a dataset. we were wondering if we could create a new dataset where the images are displayed in that order.

ivan

Re: Ordering and OMERO

PostPosted: Wed Nov 17, 2010 9:29 pm
by jmoore
Your options are either to store the ranking in a table or to use an annotation like NSINSIGHTRATING (See https://trac.openmicroscopy.org.uk/omero/browser/trunk/components/blitz/resources/omero/Constants.ice#L122), and apply it during your own visualization. But none of the OMERO clients provide ordering in a dataset like you're asking.

Cheers,
~Josh

Re: Ordering and OMERO

PostPosted: Thu Dec 09, 2010 8:55 pm
by bhcho
Hi Josh,

In addition to those questions before me,
Is it possible to duplicate image IDs on one image, without duplicating the image itself?
for example, image ID 201 and 3101 are pointing the same image in the server.
if it is possible, I guess we can create another dataset that has only those duplicate image IDs ordered by the ranking.
Then it will show us the ordered images.

I'm not sure about this.


Best,
BK

Re: Ordering and OMERO

PostPosted: Thu Dec 09, 2010 10:55 pm
by bhcho
Oh I just found the current workspace shows those images ordered by their image names (or acquisition date), rather than IDs. Then It's not a good idea to change the image names.

What I see from the Insight, the ordering is either by the image names or by the acquisition date.
Do you have any idea or a plan to develop another image display ordering method by using "tag" or "rate" or something else?
for the rate, the current rate system is only for 5 stars. For our purpose, it should be better if the rate measurement could be a double/float number.


So, my idea is something like this.
after we rank some images (by an automatic method), we generate another dataset that holds only the image IDs (instead of duplicating images themselves), which are pointing the original image. And those image IDs have their own rates by the ranking. And finally the workspace displays those images by referring the image IDs, ordered by the rates.

is this possible to do?

Best,
BK

Re: Ordering and OMERO

PostPosted: Fri Dec 10, 2010 4:32 pm
by jburel
Thanks for your feedback.
Currently, we only allow to order by name or date, as you have noticed it is not enough.
We opened a ticket http://trac.openmicroscopy.org.uk/omero/ticket/1617 but w/o enough feedback and time, we did not make progress on it.
It will be great if you can add some criteria that you think, will be useful (rating is one)

What can you do now with the current application?
You can display images, with a given rating, One rate at time.


for the rate, the current rate system is only for 5 stars. For our purpose, it should be better if the rate measurement could be a double/float number.

We currently use Long annotation for rating. Maybe we can think of another one with a different name space or modifying the existing one, and use the combination of keywords and name space. We will need to evaluate such change.

Jmarie

Re: Ordering and OMERO

PostPosted: Sat Dec 11, 2010 12:17 am
by bhcho
Hi Jmarie,

Thanks for the reply.

As I mentioned, we are developing an relevance feedback application that retrieves images, which are similar to the image that I'm looking at. We'd like to plug it into OMERO.insight.
we already have the core functions and the interface with OMERO DB.

The scenario of using that application is that...
A user selects one or more images (by clicking or something) and run the relevance feedback (by clicking a button or a Script menu). Then a kind of a pop-up dialog window will come up, in which there are several options.
After running the function and some calculation, it retrieves some ranked image file IDs in a specific order and we want to display them by that order in the Workspace of the OMERO.Insight.

Currently, I'm not sure if we can generate a temporary dataset with only image file IDs, instead of duplicating images themselves (Could you tell me if it's possible with current OMERO version 4.2.1?).
Anyway, assuming it's possible, we are displaying by the ranking (possibly using the rating or the namespace with ranking such as rank:1:, rank:2:, and so on).
Then from the workspace, the user may want manually de-select some images or re-arrange the ordering (In this case the rating or the namespace should be modified dynamically as the user changes).
Finally, user will be asked if he/she want to save the ranked images as another regular dataset. If the user says no, the temporary dataset will be deleted.

After I wrote what we want, it looks like a huge update will be needed for OMERO.
I also want to hear from you about what could be possible or what could be impossible. or what could be an alternative way.

Thank you again for the consideration.

Best,
BK