We're Hiring!

OMERO.iviewer can't open file

Having a problem deploying OMERO? 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

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Re: OMERO.iviewer can't open file

Postby kennethgillen » Tue Nov 06, 2018 12:19 pm

Hi Chris,

evenhuis wrote:
Code: Select all
html>
    <head>
        <title>Request Rejected</title>
    </head>
    <body>The requested URL was rejected. Please consult with your administrator.
        <br>
        <br>Your support ID is: 18296077467092126312
        <br>
        <br>
        <a href='javascript:history.back();'>[Go Back]</a>
    </body>
</html>


You have another problem here. This message is not from the OMERO stack, but from what I suspect is a firewall device from F5 networks.

You should contact your IT (network) support team with that message, reference and the date/time it happened, and ask them to configure your network to allow your clients access to the OMERO web and application servers without this device blocking the access.

https://stackoverflow.com/a/28353068/286218
supported by https://support.f5.com/csp/article/K7825

Best,

Kenny
kennethgillen
 
Posts: 254
Joined: Mon Nov 05, 2012 3:39 pm

Re: OMERO.iviewer can't open file

Postby evenhuis » Thu Nov 08, 2018 5:33 am

Hi jmarie,

yes it open is in OMERO.figure with the correct size metadata.

Screen Shot 2018-11-08 at 4.28.49 pm.png
Screen Shot 2018-11-08 at 4.28.49 pm.png (99.81 KiB) Viewed 1549 times



now we need to figure out why it is correct when I import the image in our system and not in yours.


I'm not that familiar with the internals of OMERO so I'm not sure why the metadata would be mangled for the REST API and OMERO.iviewer but be OK for OMERO.figure, image viewer and the metadata pane in the we browser.

Any suggestions for where to start looking would be great.

Thanks,

Chris
evenhuis
 
Posts: 61
Joined: Tue Jan 30, 2018 4:47 am

Re: OMERO.iviewer can't open file

Postby jburel » Thu Nov 08, 2018 1:06 pm

Hi Chris

Actually iviewer and figure do not use the JSON API to retrieve the image information.
But there is a difference between the 2 apps when the physical size values are marshalled.
This might be the source of the problem. This will require some investigation.
It is a bit tricky since I cannot reproduce the error locally.
Cheers

Jmarie
User avatar
jburel
Team Member
 
Posts: 348
Joined: Thu May 21, 2009 6:38 pm
Location: dundee

Re: OMERO.iviewer can't open file

Postby wmoore » Tue Mar 12, 2019 4:49 am

Hi Chris,

After we discussed this in Brisbane last weekend, I looked at the similar issue we had with pixel sizes of Infinity etc (see https://trello.com/c/X5egtRjc/3-iviewer ... nan-or-inf)

However, your issue is a little different in that you don't see invalid values in Figure or webclient.

When you add an image in Figure (or open the image in the old webgateway viewer) you should see in the browser dev tools that JSON data is requested by a URL like /webgateway/imgData/24401/
but it looks like the JSON in your examples above is in the format from /api/v0/m/images/24401/.

Can you check if you see the "Value": 0.**************** values in the imgData/ JSON and see the pixel size values correctly in figure? Seems incompatible that you'd see both.

Thanks,

Will.

PS: I worked on OMERO.figure "labels from Key-Value pairs" on the plane back to Perth: https://github.com/ome/omero-figure/pull/323
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: OMERO.iviewer can't open file

Postby wmoore » Tue Mar 12, 2019 4:50 am

NB: Internally, the sample image is at http://web-dev-merge.openmicroscopy.org ... age-157104 (user-1).
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: OMERO.iviewer can't open file

Postby evenhuis » Wed Mar 13, 2019 2:31 am

Hi Will,

it was great to meet you in Brisbane, thanks for getting back to me so quickly.

When you add an image in Figure (or open the image in the old webgateway viewer) you should see in the browser dev tools that JSON data is requested by a URL like /webgateway/imgData/24401/
but it looks like the JSON in your examples above is in the format from /api/v0/m/images/24401/.


You'll have to forgive my ignorance here, I had a poke around the developer tools in safari and Firefox but could find where the JSON request is.

When opening with OMERO.iviewer there are two errors in the debug console

Code: Select all
        function o(t, e, i) {
            i && e.stack && "object" === (void 0 === t ? "undefined" : u(t)) && null !== t && (t.stack = l(t.stack) + e.stack), "onError" in e ? e.onError(t) : setTimeout(function() {
                throw t
            }, 0).   # main.js 1311 TypeError: null is not an object (evaluating 'this.image_config.image_info')
        }


and

Code: Select all
e.prototype.requestData = function(e) {
                        var i = this;
                        "boolean" != typeof e && (e = !1), this.ready = !1, t.ajax({
                            url: this.context.server + this.context.getPrefixedURI(l.i) + "/image_data/" + this.image_id + "/",
                            success: function(t) {
                                i.initializeImageInfo(t, e), i.context.initial_type !== l.h.WELL && "number" != typeof i.parent_id && "object" === u(t.meta) && "number" == typeof t.meta.datasetId && (i.parent_id = t.meta.datasetId), i.requestImgRDef();
                                var n = i.context.getImageConfig(i.config_id);
                                i.context.isRoisTabActive() && n.regions_info.requestData()
                            },
                            error: function(t) {
                                i.ready = !1, i.error = !0, "string" == typeof t.responseText && console.error(t.responseText), "number" == typeof i.config_id && i.context.removeImageConfig(i.config_id); # main.js 1789
                                var e = 404 === t.status ? "Image not found" : "Failed to get image data";
                                a.a.showModalMessage(e, "OK")
                            }


where the error is:
Code: Select all
{"delta_t_unit_symbol": null, "init_zoom": 0, "tiles": false, "families": ["polynomial", "logarithmic", "linear", "exponential"], "roi_count": 0, "perms": {"canAnnotate": true, "canEdit": true, "canDelete": true, "canLink": true}, "rdefs": {"defaultT": 0, "model": "color", "invertAxis": false, "projection": "normal", "defaultZ": 8}, "pixel_range": [0, 65535], "interpolate": true, "channels": [{"coefficient": 1.0, "active": true, "window": {"max": 4095.0, "end": 4095.0, "start": 20.0, "min": 20.0}, "family": "linear", "color": "0000FF", "inverted": false, "reverseIntensity": false, "emissionWave": 450.0, "label": "Hoechst33258"}, {"coefficient": 1.0, "active": true, "window": {"max": 90.0, "end": 90.0, "start": 26.0, "min": 26.0}, "family": "linear", "color": "FFFFFF", "inverted": false, "reverseIntensity": false, "emissionWave": null, "label": "TD"}], "meta": {"projectName": "Nikon_A1", "imageId": 93002, "imageAuthor": "Mahsa Asadniaye Fard Jahromi", "imageTimestamp": 1540173399.0, "pixelsType": "uint16", "datasetId": 2901, "projectDescription": "", "datasetName": "Mahsa", "wellSampleId": "", "projectId": 970, "imageDescription": "", "wellId": "", "imageName": "tile006.nd2", "datasetDescription": ""}, "id": 93002, "pixel_size": {"symbol_y": "\u00b5m", "symbol_x": "\u00b5m", "symbol_z": "\u00b5m", "unit_y": 0.****************, "unit_x": 0.****************, "unit_z": 10.0, "y": 0.****************, "x": 0.****************, "z": 10.0}, "size": {"width": 1024, "c": 2, "z": 17, "t": 1, "height": 1024}, "split_channel": {"c": {"width": 2054, "gridy": 2, "border": 2, "gridx": 2, "height": 2054}, "g": {"width": 2054, "gridy": 1, "border": 2, "gridx": 2, "height": 1028}}, "import_date": "2018-10-22 02:56:39", "delta_t": []}



Looking at the network tabs in the oldviewer there are 2 JSON requests, LUT and imageRef. The imageRef is from:
https://omero.research.uts.edu.au/webcl ... 2445025533

and looks like
Code: Select all
jQuery1111021698152396249681_1552445170698({
    "init_zoom": 0,
    "tiles": false,
    "perms": {
        "canAnnotate": true,
        "canEdit": true,
        "canDelete": true,
        "canLink": true
    },
    "rdefs": {
        "defaultT": 0,
        "model": "color",
        "invertAxis": false,
        "projection": "normal",
        "defaultZ": 8
    },
    "pixel_range": [0, 65535],
    "interpolate": true,
    "channels": [{
        "coefficient": 1.0,
        "active": true,
        "window": {
            "max": 4095.0,
            "end": 4095.0,
            "start": 20.0,
            "min": 20.0
        },
        "family": "linear",
        "color": "0000FF",
        "inverted": false,
        "reverseIntensity": false,
        "emissionWave": 450.0,
        "label": "Hoechst33258"
    }, {
        "coefficient": 1.0,
        "active": true,
        "window": {
            "max": 90.0,
            "end": 90.0,
            "start": 26.0,
            "min": 26.0
        },
        "family": "linear",
        "color": "FFFFFF",
        "inverted": false,
        "reverseIntensity": false,
        "emissionWave": null,
        "label": "TD"
    }],
    "meta": {
        "projectName": "Nikon_A1",
        "imageId": 93002,
        "imageAuthor": "Mahsa Asadniaye Fard Jahromi",
        "imageTimestamp": 1540173399.0,
        "pixelsType": "uint16",
        "datasetId": 2901,
        "projectDescription": "",
        "datasetName": "Mahsa",
        "wellSampleId": "",
        "projectId": 970,
        "imageDescription": "",
        "wellId": "",
        "imageName": "tile006.nd2",
        "datasetDescription": ""
    },
    "id": 93002,
    "pixel_size": {
        "y": 0.2262397413186163,
        "x": 0.2262397413186163,
        "z": 10.0
    },
    "size": {
        "width": 1024,
        "c": 2,
        "z": 17,
        "t": 1,
        "height": 1024
    },
    "split_channel": {
        "c": {
            "width": 2054,
            "gridy": 2,
            "border": 2,
            "gridx": 2,
            "height": 2054
        },
        "g": {
            "width": 2054,
            "gridy": 1,
            "border": 2,
            "gridx": 2,
            "height": 1028
        }
    }
})


Does that help at all?

Cheers,

Chris
evenhuis
 
Posts: 61
Joined: Tue Jan 30, 2018 4:47 am

Re: OMERO.iviewer can't open file

Postby wmoore » Fri Mar 15, 2019 5:40 am

Thanks Chris,
I'm looking into it, but haven't had time to track down an answer yet.
I'll get back to you next week...
Regards,

Will
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: OMERO.iviewer can't open file

Postby evenhuis » Fri Mar 15, 2019 10:01 am

Hi Will,

no worries. Let me know what I can do on my end to help out - you might have to give really explicit instructions though as I don't much experience with web stuff.

Another dumb question, I'd like to try out your PR for the key-value labels in OMERO.figure. I've only done the installs through pip before, is it possible to update OMERO.figure by pulling the change from github?

Cheers,

Chris
evenhuis
 
Posts: 61
Joined: Tue Jan 30, 2018 4:47 am

Re: OMERO.iviewer can't open file

Postby wmoore » Mon Mar 18, 2019 2:33 am

Hi Chris,

I'm not sure we can get much further at our end without being able to reproduce.
I've looked at the code path that is producing the strange JSON data for you
Code: Select all
"unit_x": 0.****************,

and tried Googling for what might be causing that, but it seems that searching for "0.****************" doesn't help much!

If you *can* try this on your OMERO.web server, it would be interesting to see whether you get the same result, but I understand this might be tricky for you to get set up etc.

You should be able to run:

Code: Select all
$ bin/omero shell --login


Then enter the OMERO.server address and login details.
Then follow the terminal commands below, using the Image ID of the tile006.nd2 image.

Code: Select all
In [1]: from omero.gateway import BlitzGateway

In [2]: conn = BlitzGateway(client_obj=client)

In [3]: image = conn.getObject("Image", 157104)

In [4]: image.getName()
Out[4]: 'tile006.nd2'

In [5]: px = image.getPrimaryPixels().getPhysicalSizeX()

In [6]: from omeroweb.webgateway.templatetags.common_filters import lengthformat

In [7]: size = image.getPixelSizeX(True)

In [8]: length = size.getValue()

In [9]: length
Out[9]: 0.2262397413186163

In [10]: size
Out[10]:
object #0 (::omero::model::Length)
{
    _value = 0.226239741319
    _unit = MICROMETER
}

In [11]: x = lengthformat(length)

In [12]: x
Out[12]: 0.2262397413186163

In [13]: import json

In [14]: json.dumps({'unit_x': x})
Out[14]: '{"unit_x": 0.2262397413186163}'

In [15]: from django.http import JsonResponse

In [16]: rsp = JsonResponse({'unit_x': x})

In [17]: rsp.content
Out[17]: '{"unit_x": 0.2262397413186163}'


If you get the "unit_x": 0.**************** here then we will at least have narrowed down the source of the error, if not actually understanding it!

I'll answer the OMERO.figure question on the PR.

Regards,

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: OMERO.iviewer can't open file

Postby wmoore » Mon Mar 18, 2019 2:59 am

To see the JSON that iviewer is using, you can go to:

https://omero.research.uts.edu.au/iview ... data/93002
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

PreviousNext

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest

cron