This application is built using Plotly's Dash framework and provides a web-based interface for visualizing and annotating high resolution images output from ALS beamlines.
Image data is accessed via a Tiled client, which provides chunkwise access to multidimensional TIFF sequences.
pip install -r requirements.txt
and
pip install -r requirements-dev.txt
.env
file to configure a connection to the Tiled server, differentiate between local testing and development mode and set a user and password for basic autherization:DATA_TILED_URI='https://tiled-seg.als.lbl.gov'
DATA_TILED_API_KEY=<key-provided-on-request>
DASH_DEPLOYMENT_LOC='Local'
MODE='dev'
python app.py
For local testing of just the annotation functionality, developers may also choose to set up a local Tiled server with access to minimal datasets (eg. in the case that the remote server is down).
To download some sample data and serve it with a local Tiled serve
pip install "tiled[server]==0.1.0a114"
.DATA_TILED_URI
, to http://localhost:8000/
within the .env
file (or within your environmental variables), and use the result of a key generator (e.g. with python3 -c "import secrets; print(secrets.token_hex(32))"
) for the key entry DATA_TILED_API_KEY
python3 utils/download_sample_data.py
. This will create a data/
directory and download 2 sample projects with 2 images each./tiled_serve_dir.sh
.Starting the app will now connect to the local tiled server instead.
For deployment elsewhere add a user name and password to the environment file and remove DASH_DEPLOYMENT_LOC = "Local"
. This protect access to the application with basic authentication:
USER_NAME=<to-be-specified-per-deployment>
USER_PASSWORD=<to-be-specified-per-deployment>
MLExchange Copyright (c) 2023, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.
If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at IPO@lbl.gov.
NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.