This script converts one SVS to a DZI pyramid, links the converted assets into the DPR's file structure, and updates the DPR database.
- Build the base image in
docker/wsi-worker-base
- Tag with
kingstonduo/wsi-worker-base
(plus version) and push - Build the worker image in
docker/wsi-worker
- Tag with
kingstonduo/wsi-worker
(plus version) and push
To get started quickly, create a .env
file in wsi-worker/scripts
and then call ./run-wsi-worker.sh
.
To initialize the .env
file, copy wsi-worker/scripts/.env.example
and modify it to suit your environment (see ".env File" below).
- Put an SVS file into the host's "SVS file drop zone" directory indicated by
ENV_JOB_IN_DIR
cd wsi-worker/scripts
to make that your working directory with your.env
file- Start up your environment's docker-compose under
heavens-docker/delphinus
, otherwise the DB update will fail - Run the below command to convert the SVS to DZI and link it in the file system and to the DPR database
./run-wsi-worker.sh KPMP-Ex1 KPMP-Ex1_PAS_1of1 abc123 pas
- KPMP ID
- SVS filename without the
.svs
extension - Package File ID from the Data Lake
- Slide type. Values are 'LM', 'EM', 'IF'.
- [Optional] stain type. Values are 'he', 'pas', 'silver', 'tri', 'frz', 'tol' and 'cr'. Defaults to 'pas'
ENV_IMAGE
: defaults tokingstonduo/wsi-worker
ENV_LINK_SRC_DIR
: container KE data directory, defaults to/data/knowledgeEnvironment/deepZoom
ENV_LINK_DST_DIR
: container DPR data directory, defaults to/data/deepZoomImages
ENV_LINK_SRC_DIR_HOST
: Host KE data directory, maps toENV_LINK_SRC_DIR
ENV_LINK_DST_DIR_HOST
: Host DPR data directory, maps toENV_LINK_DST_DIR
ENV_JOB_IN_DIR
: the host directory holding the source files (.jpg/.jpeg, .svs, .tif) to be handled by the jobENV_JOB_OUT_DIR
: the host directory to holdlink.sh
anderror.txt
if errors are logged
ENV_JOB_OUT_DIR
receives byproduct files used in the jobENV_LINK_SRC_DIR
receives the DZI assets from the SVS conversionENV_LINK_DST_DIR
gets symlinks to DZI assets stored in theENV_LINK_SRC_DIR
delphinus-mongodb
container gets updated participant and slide records in the "patients" collection