Page 1 of 1

Can I sort the ROIs according to their Comments?

PostPosted: Mon Dec 03, 2018 6:58 pm
by Kouichi_C_Nakamura
I have images with lots (>100) of ROIs on OMERO. But on OMERO.iviewer, the list of ROIs appears in a random order, despite that in the original OME-TIFF files I made sure that they were in the alphabetical order. This is not really useful at all. Very difficult to find relevant ROIs from the list at the moment.

Is there a way to sort them according to Comments?

Image026.png
Image026.png (4.29 KiB) Viewed 1767 times

Re: Can I sort the ROIs according to their Comments?

PostPosted: Tue Dec 04, 2018 10:39 am
by mtbc
Dear Kouichi,

No, OMERO.iviewer does not offer ROI sorting. We wholly agree that ROIs are often too difficult to find: thank you, I shall ensure that your suggestion is included among the thinking that we have been doing about this. The issue also crops up in our training workflows and as we move toward promoting OMERO.iviewer for exploring at least some of the studies in the IDR.

Cheers,
Mark

Re: Can I sort the ROIs according to their Comments?

PostPosted: Tue Dec 04, 2018 2:45 pm
by Kouichi_C_Nakamura
Thank you, Mark.

We're creating an online brain atlas using an OMERO platform. It seems that we have no choice other than just go with the current look of ROI list, but I'd be very much appreciated if your team can implement the sort order for iviewer ROI list as soon as possible. This feature is probably crucial to user experience.

In fact, just having them alphabetical is OK, but ideally, I want to further customize the order so that a few special ROIs come at the top of the list among 100+ ROIs.

Best,
Kouichi

Re: Can I sort the ROIs according to their Comments?

PostPosted: Tue Dec 04, 2018 3:12 pm
by rgozim
Hi Kouichi,

If you are able and in urgent need of a sorting feature, you could fork omero-iviewer and make any changes required for your needs.

The code for populating and displaying ROIs is located in regions-list.html and regions-list.js.

If you run into any trouble, just let us know. Hopefully this is of some help!

Thanks,
Riad

Re: Can I sort the ROIs according to their Comments?

PostPosted: Tue Dec 11, 2018 2:50 pm
by Kouichi_C_Nakamura
Hi,

Thank you for the source code of iviewer.

In fact, ideally, we want to have a customized, partially alphabetical order for listing ROIs. eg:

Code: Select all
Bregma
Interaural
A
B
C
...
Z


In order to do this, we need to store the order of ROIs in the data. So it's not just how to show them by JavaScript, bur rather about data model implementation.

My guess is that internally, ROIs are sorted in the order of their IDs. Actually, the list is also in the same order as IDs.

I guess it is impossible to reassign them different IDs. Does this mean that there is no way we can achieve this?

The original OME-TIFF file contained ROIs in the specified order with the incremental IDs, but OMERO ignored that order. What algorithm is used to determine the order of ROIs internally then? Can I specify the order of ROIs by preparing OME-XML in a specific way?

Best,
Kouichi

Re: Can I sort the ROIs according to their Comments?

PostPosted: Thu Dec 13, 2018 1:30 pm
by mtbc
Dear Kouichi,

In this case I am afraid that I don't have any easy answers for you. It does not appear that the JSON API allows sorting to be specified for the queried ROIs and OMERO (and indeed the OME model) intrinsically do not regard ROIs as being ordered: anything you do notice about their order is not by design and may not last. For example, you may find that if you edit a ROI the list no longer comes back in order of ID: with how PostgreSQL implements MVCC the new version may appear in a new row with the previous to be vacuumed. Do touch base with us on this in the New Year as we too need to solve this to make existing IDR datasets usable: this will get fixed.

Cheers,
Mark

Re: Can I sort the ROIs according to their Comments?

PostPosted: Thu Dec 13, 2018 2:00 pm
by Kouichi_C_Nakamura
Thanks, Mark. As I understand it, no quick solution, but you guys will make an effort to deal with this.

In that case, we'll proceed with random the order ROI list and later when it's implemented, we'll be benefitted from simply updating OMERO. Can you add this to the OMERO Trello board, so that we can track the progress?

https://trello.com/b/FoyfXCaf/omero-5xx

Re: Can I sort the ROIs according to their Comments?

PostPosted: Thu Dec 13, 2018 2:41 pm
by mtbc
Dear Kouichi,

It's on https://trello.com/c/XZRTvaFj/9-sorting ... s-in-table as we intend to get the fix into v0.7.0.

Cheers,
Mark

Re: Can I sort the ROIs according to their Comments?

PostPosted: Mon Apr 15, 2019 11:15 am
by Kouichi_C_Nakamura