Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use group -1 for luts_png #603

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,36 @@ Usage
For running omero-web in production with NGINX, see See: `OMERO.web install`_ documentation.
To run in development mode, see below.

LUTs caching
------------

The OMERO server ships with a set of look-up tables (LUTs) for rendering images. Admins can also
add their own LUTs to the server. The LUTs available on the server can be retrieved from the
``/webgateway/luts/`` endpoint as JSON data.

To include the ``rgb`` values of each LUT in the JSON response, append ``?rgb=true`` to the URL.

A copy of the JSON output from ``/webgateway/luts/?rgb=true`` is included in the ``omero-web`` package
as a static file at
https://github.com/ome/omero-web/blob/master/omeroweb/webgateway/static/webgateway/json/luts.json.

This is used to generate a LUT preview png at ``/webgateway/luts_png/`` that can be used by clients
such as OMERO.ivewer and OMERO.figure to display the LUTs in a user-friendly way.
By using the static ``luts.json``, the ``/luts_png/`` can be quickly generated without needing to load LUTs from
the server.

The sequence of LUTs in ``/webgateway/luts_png/`` corresponds to the dynamic list from ``/webgateway/luts/``.
If there are new LUTs on the server that are not found in the static ``luts.json``, the ``/luts_png/`` will
show a blank placeholder for that LUT.

If you have Django caching enabled on your server (e.g. with Redis) then you can cache the png *with* new
LUTs by visiting ``/webgateway/luts_png/?cached=false``. This will then be read by other users when
they visit ``/webgateway/luts_png/``.

If Django caching isn't enabled, the JSON response from ``/webgateway/luts/?rgb=true``
can instead be manually updated in the static ``luts.json`` file in the ``omero-web`` package.


Contributing
------------

Expand Down
Loading
Loading