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/scriptsto make that your working directory with your.envfile- 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
.svsextension - 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-workerENV_LINK_SRC_DIR: container KE data directory, defaults to/data/knowledgeEnvironment/deepZoomENV_LINK_DST_DIR: container DPR data directory, defaults to/data/deepZoomImagesENV_LINK_SRC_DIR_HOST: Host KE data directory, maps toENV_LINK_SRC_DIRENV_LINK_DST_DIR_HOST: Host DPR data directory, maps toENV_LINK_DST_DIRENV_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.shanderror.txtif errors are logged
ENV_JOB_OUT_DIRreceives byproduct files used in the jobENV_LINK_SRC_DIRreceives the DZI assets from the SVS conversionENV_LINK_DST_DIRgets symlinks to DZI assets stored in theENV_LINK_SRC_DIRdelphinus-mongodbcontainer gets updated participant and slide records in the "patients" collection