diff --git a/.circleci/build-and-publish-docs.sh b/.circleci/build-and-publish-docs.sh index f86b3fcc4bd..6bddb26943c 100644 --- a/.circleci/build-and-publish-docs.sh +++ b/.circleci/build-and-publish-docs.sh @@ -1,69 +1,69 @@ -#!/bin/bash - -# Set directory to location of this script -# https://stackoverflow.com/a/3355423/1867984 -cd "$(dirname "$0")" - -yarn -v -node -v - -echo 'Installing Gitbook CLI' - -yarn global bin -yarn config get prefix -yarn config set prefix ~/.yarn -export PATH="$PATH:`yarn global bin`" - -echo 'Running Gitbook installation' - -# Generate all version's GitBook output -# For each directory in /docs ... -cd ./../docs/ -for D in *; do - if [ -d "${D}" ]; then - - echo "Generating output for: ${D}" - cd "${D}" - - # Clear previous output, generate new - rm -rf _book - gitbook install - gitbook build - - cd .. - - fi -done - -# Move CNAME File into `latest` -cp CNAME ./latest/_book/CNAME - -# Create a history folder in our latest version's output -mkdir ./latest/_book/history - -# Move each version's files to latest's history folder -for D in *; do - if [ -d "${D}" ]; then - if [ "${D}" == v* ] ; then - - echo "Moving ${D} to the latest version's history folder" - - mkdir "./latest/_book/history/${D}" - cp -v -r "./${D}/_book"/* "./latest/_book/history/${D}" - - fi - fi -done - -# Back to repo root -cd .. - -echo "Done generating documentation output" -echo 'STARTING PUBLISH' - -# WILL ALWAYS FAIL IF INITIATED FROM PR BRANCH -npx gh-pages \ - --silent \ - --repo https://$GITHUB_TOKEN@github.com/OHIF/Viewers.git \ - --message 'Autogenerated Message: [ci skip]' \ - --dist docs/latest/_book +##!/bin/bash +# +## Set directory to location of this script +## https://stackoverflow.com/a/3355423/1867984 +#cd "$(dirname "$0")" +# +#yarn -v +#node -v +# +#echo 'Installing Gitbook CLI' +# +#yarn global bin +#yarn config get prefix +#yarn config set prefix ~/.yarn +#export PATH="$PATH:`yarn global bin`" +# +#echo 'Running Gitbook installation' +# +## Generate all version's GitBook output +## For each directory in /docs ... +#cd ./../docs/ +#for D in *; do +# if [ -d "${D}" ]; then +# +# echo "Generating output for: ${D}" +# cd "${D}" +# +# # Clear previous output, generate new +# rm -rf _book +# gitbook install +# gitbook build +# +# cd .. +# +# fi +#done +# +## Move CNAME File into `latest` +#cp CNAME ./latest/_book/CNAME +# +## Create a history folder in our latest version's output +#mkdir ./latest/_book/history +# +## Move each version's files to latest's history folder +#for D in *; do +# if [ -d "${D}" ]; then +# if [ "${D}" == v* ] ; then +# +# echo "Moving ${D} to the latest version's history folder" +# +# mkdir "./latest/_book/history/${D}" +# cp -v -r "./${D}/_book"/* "./latest/_book/history/${D}" +# +# fi +# fi +#done +# +## Back to repo root +#cd .. +# +#echo "Done generating documentation output" +#echo 'STARTING PUBLISH' +# +## WILL ALWAYS FAIL IF INITIATED FROM PR BRANCH +#npx gh-pages \ +# --silent \ +# --repo https://$GITHUB_TOKEN@github.com/OHIF/Viewers.git \ +# --message 'Autogenerated Message: [ci skip]' \ +# --dist docs/latest/_book diff --git a/.circleci/config.yml b/.circleci/config.yml index e364e3bf665..26039fb10f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,500 +1,643 @@ version: 2.1 - -### ABOUT -# -# This configuration powers our Circleci.io integration -# -# Note: -# Netlify works independently from this configuration to -# create pull request previews and to update `https://docs.ohif.org` -### - -## https://github.com/cypress-io/circleci-orb -## -orbs: - codecov: codecov/codecov@1.0.5 - cypress: cypress-io/cypress@1.26.0 -executors: - # Custom executor to override Cypress config - deploy-to-prod-executor: - docker: - - image: 'cypress/browsers:node14.15.0-chrome86-ff82' - environment: - CYPRESS_BASE_URL: https://ohif-staging.netlify.com/ - chrome-and-pacs: - docker: - # Primary container image where all steps run. - - image: 'cypress/browsers:node14.15.0-chrome86-ff82' - - image: 'ohif/viewer-testdata:0.1-test' - -defaults: &defaults - docker: - - image: circleci/node:14.15.0 - environment: - TERM: xterm # Enable colors in term - QUICK_BUILD: true - working_directory: ~/repo - -jobs: - ### - # Workflow: PR_CHECKS - ### - UNIT_TESTS: - <<: *defaults +# Force for config +commands: + deployment_setup: steps: - # Update yarn - - run: yarn -v - # Checkout code and ALL Git Tags - - checkout: - post: - - git fetch --all - - restore_cache: - name: Restore Yarn and Cypress Package Cache - keys: - # when lock file changes, use increasingly general patterns to restore cache - - yarn-packages-{{ checksum "yarn.lock" }} - - yarn-packages- - - run: - name: Install Dependencies - command: yarn install --frozen-lockfile - - save_cache: - name: Save Yarn Package Cache - paths: - - ~/.cache ## Cache yarn and Cypress - key: yarn-packages-{{ checksum "yarn.lock" }} - # RUN TESTS - run: - name: 'JavaScript Test Suite' - command: yarn run test:unit:ci - # PLATFORM/VIEWER - - run: - name: 'VIEWER: Combine report output' + name: 'Set the Tier' command: | - viewerCov="/home/circleci/repo/platform/viewer/coverage" - touch "${viewerCov}/reports" - cat "${viewerCov}/clover.xml" >> "${viewerCov}/reports" - echo "\<<\<<\<< EOF" >> "${viewerCov}/reports" - cat "${viewerCov}/lcov.info" >>"${viewerCov}/reports" - echo "\<<\<<\<< EOF" >> "${viewerCov}/reports" - - codecov/upload: - file: '/home/circleci/repo/platform/viewer/coverage/reports' - flags: 'viewer' - # PLATFORM/CORE + TIER=DEV + if [[ ${CIRCLE_BRANCH} =~ idc-viewer-(prod|test).* ]]; then + TIER=$(awk -F- '{print toupper($3)}' \<<< ${CIRCLE_BRANCH}) + fi + echo "export TIER=${TIER}" >> $BASH_ENV + echo "Tier was identified as ${TIER} for branch ${CIRCLE_BRANCH}" - run: - name: 'CORE: Combine report output' + name: 'Assign Project-level vars' command: | - coreCov="/home/circleci/repo/platform/core/coverage" - touch "${coreCov}/reports" - cat "${coreCov}/clover.xml" >> "${coreCov}/reports" - echo "\<<\<<\<< EOF" >> "${coreCov}/reports" - cat "${coreCov}/lcov.info" >> "${coreCov}/reports" - echo "\<<\<<\<< EOF" >> "${coreCov}/reports" - - codecov/upload: - file: '/home/circleci/repo/platform/core/coverage/reports' - flags: 'core' - - ### - # Workflow: PR_OPTIONAL_DOCKER_PUBLISH - ### - DOCKER_PR_PUBLISH: - <<: *defaults - steps: - # Enable yarn workspaces - - run: yarn config set workspaces-experimental true - - # Checkout code and ALL Git Tags - - checkout: - post: - - git fetch --all - - - restore_cache: - name: Restore Yarn and Cypress Package Cache - keys: - # when lock file changes, use increasingly general patterns to restore cache - - yarn-packages-{{ checksum "yarn.lock" }} - - yarn-packages- - - - run: - name: Install Dependencies - command: yarn install --frozen-lockfile - - - setup_remote_docker: - docker_layer_caching: false + if [ ! -f deployment.key.json ]; then + echo "Deployment JSON keyfile not found - loading from CircleCI." + KEY=${DEPLOYMENT_KEY_IDC_DEV} + else + echo "Deployment JSON keyfile found." + KEY="NA" + fi + CLIENT_EMAIL=${DEPLOYMENT_CLIENT_EMAIL_IDC_DEV} + PROJECT_ID=${DEPLOYMENT_PROJECT_ID_IDC_DEV} + BUCKET=${DEPLOYMENT_BUCKET_IDC_DEV} + if [[ ${TIER} == "PROD" ]]; then + KEY=${DEPLOYMENT_KEY_IDC_PROD} + CLIENT_EMAIL=${DEPLOYMENT_CLIENT_EMAIL_IDC_PROD} + PROJECT_ID=${DEPLOYMENT_PROJECT_ID_IDC_PROD} + BUCKET=${DEPLOYMENT_BUCKET_IDC_PROD} + echo "Using production project and related deployment SA and bucket." + elif [[ ${TIER} == "TEST" ]]; then + KEY=${DEPLOYMENT_KEY_IDC_TEST} + CLIENT_EMAIL=${DEPLOYMENT_CLIENT_EMAIL_IDC_TEST} + PROJECT_ID=${DEPLOYMENT_PROJECT_ID_IDC_TEST} + BUCKET=${DEPLOYMENT_BUCKET_IDC_TEST} + echo "Using test project and related deployment SA and bucket." + elif [[ ${TIER} == "DEV" ]]; then + echo "Using development/default project and related deployment SA and bucket." + else + echo "[ERROR] - Unrecognized tier: ${TIER} - exiting." + exit 1 + fi + echo "export DEPLOYMENT_KEY=\"${KEY}\"" >> $BASH_ENV + echo "export DEPLOYMENT_CLIENT_EMAIL=${CLIENT_EMAIL}" >> $BASH_ENV + echo "export DEPLOYMENT_PROJECT_ID=${PROJECT_ID}" >> $BASH_ENV + echo "export DEPLOYMENT_BUCKET=${BUCKET}" >> $BASH_ENV - - run: - name: Build and push Docker image - command: | - # Remove npm config - rm -f ./.npmrc - # Set our version number using vars - echo $CIRCLE_BUILD_NUM - # Build our image, auth, and push - docker build --tag ohif/viewer:PR_BUILD-$CIRCLE_BUILD_NUM . - echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin - docker push ohif/viewer:PR_BUILD-$CIRCLE_BUILD_NUM + echo "Project settings assigned:" + echo "Deployment client: ${CLIENT_EMAIL}" + echo "Deployment project: ${PROJECT_ID}" + echo "Deployment bucket: gs://${BUCKET}" - ### - # Workflow: DEPLOY - ### - BUILD: - <<: *defaults + deployment_config: steps: - # Checkout code and ALL Git Tags - - checkout: - post: - - git fetch --all - - restore_cache: - name: Restore Yarn and Cypress Package Cache - keys: - # when lock file changes, use increasingly general patterns to restore cache - - yarn-packages-{{ checksum "yarn.lock" }} - - yarn-packages- - run: - name: Install Dependencies - command: yarn install --frozen-lockfile - - save_cache: - name: Save Yarn Package Cache - paths: - - ~/.cache ## Cache yarn and Cypress - key: yarn-packages-{{ checksum "yarn.lock" }} - # Build & Test - - run: - name: 'Build the OHIF Viewer' - command: yarn run build - no_output_timeout: 45m - # - run: - # name: 'Upload SourceMaps, Send Deploy Notification' - # command: | - # # export FILE_1=$(find ./build/static/js -type f -name "2.*.js" -exec basename {} \;) - # # export FILE_MAIN=$(find ./build/static/js -type f -name "main.*.js" -exec basename {} \;) - # # export FILE_RUNTIME_MAIN=$(find ./build/static/js -type f -name "runtime~main.*.js" -exec basename {} \;) - # # curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_1.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_1 - # # curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_MAIN.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_MAIN - # # curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_RUNTIME_MAIN.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_RUNTIME_MAIN - # curl --request POST https://api.rollbar.com/api/1/deploy/ -F access_token=$ROLLBAR_TOKEN -F environment=$GOOGLE_STORAGE_BUCKET -F revision=$CIRCLE_SHA1 -F local_username=CircleCI - # Persist :+1: - - persist_to_workspace: - root: ~/repo - paths: - - platform/viewer/dist - - netlify.toml - - .netlify + name: 'Set tier-specific configuration file' + command: | + sudo -E /bin/bash ./idc-deploy-shell/pull_config.sh + xargs -a viewer_deployment_config.txt -I{} echo "export {}" >> $BASH_ENV - DEPLOY_TO_DEV: - docker: - - image: circleci/node:14.15.0 - environment: - TERM: xterm - NETLIFY_SITE_ID: 32708787-c9b0-4634-b50f-7ca41952da77 - working_directory: ~/repo + auth: steps: - - attach_workspace: - at: ~/repo - - run: cd .netlify && npm install - run: - cp .netlify/deploy-workflow/_redirects platform/viewer/dist/_redirects - - run: cd .netlify && npm run deploy + name: 'Service Account Auth and Project Settings' + command: | + sudo -E /bin/bash ./idc-deploy-shell/gcloud_authenticate.sh - DEPLOY_TO_STAGING: - docker: - - image: circleci/node:14.15.0 - environment: - TERM: xterm - NETLIFY_SITE_ID: c7502ae3-b150-493c-8422-05701e44a969 - working_directory: ~/repo + install_cloud_sdk: steps: - - attach_workspace: - at: ~/repo - - run: cd .netlify && npm install - run: - cp .netlify/deploy-workflow/_redirects platform/viewer/dist/_redirects - - run: cd .netlify && npm run deploy + name: 'Install CloudSDK' + command: | + echo "export CLOUDSDK_CORE_DISABLE_PROMPTS=1" >> $BASH_ENV + sudo apt-get install ca-certificates + echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list + curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - + sudo apt-get update -qq + sudo apt-get -y install google-cloud-sdk - DEPLOY_TO_PRODUCTION: +jobs: + build_job: + environment: + TZ: '/usr/share/zoneinfo/America/Los_Angeles' + working_directory: ~/Viewers docker: - - image: circleci/node:14.15.0 - environment: - TERM: xterm - NETLIFY_SITE_ID: 79c4a5da-5c95-4dc9-84f7-45fd9dfe21b0 - working_directory: ~/repo + - image: circleci/python:3.7.0-stretch steps: - - attach_workspace: - at: ~/repo - - run: cd .netlify && npm install - - run: - cp .netlify/deploy-workflow/_redirects platform/viewer/dist/_redirects - - run: cd .netlify && npm run deploy - - ### - # Workflow: RELEASE - ### - NPM_PUBLISH: - <<: *defaults - steps: - - run: yarn -v - # Checkout code and ALL Git Tags - - checkout: - post: - - git fetch --all - # Use increasingly general patterns to restore cache - - restore_cache: - name: Restore Yarn and Cypress Package Cache - keys: - - yarn-packages-{{ checksum "yarn.lock" }} - - yarn-packages- + - checkout + - install_cloud_sdk + - deployment_setup + - auth + - deployment_config - run: name: Install Dependencies - command: yarn install --frozen-lockfile - - save_cache: - name: Save Yarn Package Cache - paths: - - ~/.cache/yarn - key: yarn-packages-{{ checksum "yarn.lock" }} + command: | + sudo -E /bin/bash ./idc-deploy-shell/install-deps.sh - run: - name: Avoid hosts unknown for github + name: Copy in IDC favicons command: | - rm -rf ~/.ssh - mkdir ~/.ssh/ - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config - git config --global user.email "danny.ri.brown+ohif-bot@gmail.com" - git config --global user.name "ohif-bot" + cp ~/Viewers/idc-assets/favicon-nci.ico ~/Viewers/platform/viewer/public/assets/favicon.ico + cp ~/Viewers/idc-assets/favicon-nci-16x16.png ~/Viewers/platform/viewer/public/assets/favicon-16x16.png + cp ~/Viewers/idc-assets/favicon-nci-32x32.png ~/Viewers/platform/viewer/public/assets/favicon-32x32.png - run: - name: Authenticate with NPM registry - command: - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc - - run: npx lerna version - - run: npx lerna publish from-package - - persist_to_workspace: - root: ~/repo - paths: . + name: Build Viewer + command: | + # Send output while viewer is building.... + chmod u+x ./idc-deploy-shell/pingJob.sh ./idc-deploy-shell/killPing.sh + ./idc-deploy-shell/pingJob.sh & + /bin/bash ./idc-deploy-shell/buildViewer.sh + ./idc-deploy-shell/killPing.sh + + - save_cache: + key: idc-viewer-{{ epoch }} + paths: + - ./platform/viewer/dist + - ./idc-deploy-shell + - ./idc-assets - DOCS_PUBLISH: + deploy_job: + environment: + TZ: '/usr/share/zoneinfo/America/Los_Angeles' docker: - # Gitbook fails due to graceful-fs updates above this node version :-( - - image: circleci/node:12.9.1 - environment: - TERM: xterm # Enable colors in term - working_directory: ~/repo + - image: circleci/python:3.7.0-stretch + working_directory: ~/Viewers steps: - - checkout + - restore_cache: + keys: + - idc-viewer- + - install_cloud_sdk + - deployment_setup + - auth + - deployment_config - run: - name: Avoid hosts unknown for github + name: Customize Config command: | - rm -rf ~/.ssh - mkdir ~/.ssh/ - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config - git config --global user.email "danny.ri.brown+ohif-bot@gmail.com" - git config --global user.name "ohif-bot" - - run: yarn global add gitbook-cli gh-pages - - run: chmod +x ~/repo/.circleci/build-and-publish-docs.sh - - run: ~/repo/.circleci/build-and-publish-docs.sh - - DOCKER_MASTER_PUBLISH: - <<: *defaults - steps: - - attach_workspace: - at: ~/repo - - setup_remote_docker: - docker_layer_caching: false + /bin/bash ./idc-deploy-shell/prepare_config.sh > platform/viewer/dist/app-config.js + cp ~/Viewers/idc-assets/IDC-Logo-WHITE.svg platform/viewer/dist/IDC-Logo-WHITE.svg - run: - name: Build and push Docker image + name: Copy to cloud command: | - # This file will exist if a new version was published by - # our command in the previous job. Created in npm postpublish hook - # in the `platform/viewer` project. - if [[ ! -e platform/viewer/success_version.txt ]]; then - exit 0 - else - # Remove npm config - rm -f ./.npmrc - # Set our version number using vars - export IMAGE_VERSION=$(cat platform/viewer/success_version.txt) - export IMAGE_VERSION_FULL=v$IMAGE_VERSION.${CIRCLE_BUILD_NUM} - echo $IMAGE_VERSION - echo $IMAGE_VERSION_FULL - # Build our image, auth, and push - docker build --tag ohif/$IMAGE_NAME:$IMAGE_VERSION_FULL --tag ohif/$IMAGE_NAME:latest . - echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin - docker push ohif/$IMAGE_NAME:$IMAGE_VERSION_FULL - docker push ohif/$IMAGE_NAME:latest - fi + /bin/bash ./idc-deploy-shell/cloudCopy.sh workflows: version: 2 - - PR_CHECKS: + build_and_deploy: jobs: - - UNIT_TESTS: + - build_job: filters: branches: - ignore: + only: - master - - feature/* - - hotfix/* - # E2E: PWA - - cypress/run: - name: 'E2E: PWA' - executor: chrome-and-pacs - browser: chrome - pre-steps: - - run: | - # Clear yarn cache; update to latest - rm -rf ~/.yarn - npm i -g yarn - yarn -v - yarn: true - record: true - store_artifacts: true - working_directory: platform/viewer - build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build - start: yarn run test:e2e:serve - spec: 'cypress/integration/common/**/*,cypress/integration/pwa/**/*' - wait-on: 'http://localhost:3000' - cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' - no-workspace: true # Don't persist workspace - post-steps: - - store_artifacts: - path: platform/viewer/cypress/screenshots - - store_artifacts: - path: platform/viewer/cypress/videos - - store_test_results: - path: platform/viewer/cypress/results - requires: - - UNIT_TESTS - # E2E: script-tag - - cypress/run: - name: 'E2E: Script Tag' - executor: chrome-and-pacs - browser: chrome - pre-steps: - - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v' # Use yarn latest - yarn: true - record: true - store_artifacts: true - working_directory: platform/viewer - build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build:package - start: yarn run test:e2e:serve - spec: 'cypress/integration/common/**/*,cypress/integration/script-tag/**/*' - wait-on: 'http://localhost:3000' - cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' - no-workspace: true # Don't persist workspace - post-steps: - - store_artifacts: - path: platform/viewer/cypress/screenshots - - store_artifacts: - path: platform/viewer/cypress/videos - - store_test_results: - path: platform/viewer/cypress/results - requires: - - UNIT_TESTS - - PR_OPTIONAL_VISUAL_TESTS: - jobs: - - AWAIT_APPROVAL: - type: approval - # Update hub.docker.org - - cypress/run: - name: 'Generate Percy Snapshots' - executor: chrome-and-pacs - browser: chrome - pre-steps: - - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global - add wait-on' # Use yarn latest - yarn: true - store_artifacts: false - working_directory: platform/viewer - build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build - # start server --> verify running --> percy + chrome + cypress - command: yarn run test:e2e:dist - cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' - no-workspace: true # Don't persist workspace - post-steps: - - store_artifacts: - path: platform/viewer/cypress/screenshots - - store_artifacts: - path: platform/viewer/cypress/videos - requires: - - AWAIT_APPROVAL - - PR_OPTIONAL_DOCKER_PUBLISH: - jobs: - # https://circleci.com/docs/2.0/workflows/#holding-a-workflow-for-a-manual-approval - - AWAIT_APPROVAL: - type: approval - # Update hub.docker.org - - DOCKER_PR_PUBLISH: - context: Docker Hub + - idc-viewer-prod + - idc-viewer-test + - deploy_job: requires: - - AWAIT_APPROVAL - - ### - # Our workflow for building, deploying, and promoting builds across our - # development, staging, and production environments. - ### - DEPLOY: - jobs: - - BUILD: + - build_job filters: branches: - only: master - - DEPLOY_TO_DEV: - requires: - - BUILD - - PROMOTE_TO_STAGING: - type: approval - requires: - - DEPLOY_TO_DEV - - DEPLOY_TO_STAGING: - requires: - - PROMOTE_TO_STAGING - - PROMOTE_TO_PRODUCTION: - type: approval - requires: - - DEPLOY_TO_STAGING - - DEPLOY_TO_PRODUCTION: - requires: - - PROMOTE_TO_PRODUCTION - ### - # Unit and E2E tests have already run for PR_CHECKS - # Re-running should not gain us any confidence here - ### - RELEASE: - jobs: - - NPM_PUBLISH: - filters: - branches: - only: master - - DOCS_PUBLISH: - filters: - branches: - only: master - # Update base branch snapshots - # and record a Cypress dashboard test run - - cypress/run: - name: 'Generate Percy Snapshots' - executor: chrome-and-pacs - browser: chrome - pre-steps: - - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global - add wait-on' # Use yarn latest - yarn: true - store_artifacts: false - working_directory: platform/viewer - build: npx cross-env QUICK_BUILD=true APP_CONFIG=config/dicomweb-server.js yarn run build - # start server --> verify running --> percy + chrome + cypress - command: yarn run test:e2e:dist - cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' - no-workspace: true # Don't persist workspace - post-steps: - - store_artifacts: - path: platform/viewer/cypress/screenshots - - store_artifacts: - path: platform/viewer/cypress/videos - - store_test_results: - path: platform/viewer/cypress/results - filters: - branches: - only: master - - DOCKER_MASTER_PUBLISH: - requires: - - NPM_PUBLISH + only: + - master + - idc-viewer-prod + - idc-viewer-test + +#version: 2.1 +# +#### ABOUT +## +## This configuration powers our Circleci.io integration +## +## Note: +## Netlify works independently from this configuration to +## create pull request previews and to update `https://docs.ohif.org` +#### +# +### https://github.com/cypress-io/circleci-orb +### +#orbs: +# codecov: codecov/codecov@1.0.5 +# cypress: cypress-io/cypress@1.13.0 +# +#defaults: &defaults +# docker: +# - image: circleci/node:12.9.1 +# environment: +# TERM: xterm # Enable colors in term +# QUICK_BUILD: true +# working_directory: ~/repo +# +#jobs: +# ### +# # Workflow: PR_CHECKS +# ### +# UNIT_TESTS: +# <<: *defaults +# steps: +# # Update yarn +# - run: yarn -v +# # Checkout code and ALL Git Tags +# - checkout: +# post: +# - git fetch --all +# - restore_cache: +# name: Restore Yarn and Cypress Package Cache +# keys: +# # when lock file changes, use increasingly general patterns to restore cache +# - yarn-packages-{{ checksum "yarn.lock" }} +# - yarn-packages- +# - run: +# name: Install Dependencies +# command: yarn install --frozen-lockfile +# - save_cache: +# name: Save Yarn Package Cache +# paths: +# - ~/.cache ## Cache yarn and Cypress +# key: yarn-packages-{{ checksum "yarn.lock" }} +# # RUN TESTS +# - run: +# name: 'JavaScript Test Suite' +# command: yarn run test:unit:ci +# # PLATFORM/VIEWER +# - run: +# name: 'VIEWER: Combine report output' +# command: | +# viewerCov="/home/circleci/repo/platform/viewer/coverage" +# touch "${viewerCov}/reports" +# cat "${viewerCov}/clover.xml" >> "${viewerCov}/reports" +# echo "\<<\<<\<< EOF" >> "${viewerCov}/reports" +# cat "${viewerCov}/lcov.info" >>"${viewerCov}/reports" +# echo "\<<\<<\<< EOF" >> "${viewerCov}/reports" +# - codecov/upload: +# file: '/home/circleci/repo/platform/viewer/coverage/reports' +# flags: 'viewer' +# # PLATFORM/CORE +# - run: +# name: 'CORE: Combine report output' +# command: | +# coreCov="/home/circleci/repo/platform/core/coverage" +# touch "${coreCov}/reports" +# cat "${coreCov}/clover.xml" >> "${coreCov}/reports" +# echo "\<<\<<\<< EOF" >> "${coreCov}/reports" +# cat "${coreCov}/lcov.info" >> "${coreCov}/reports" +# echo "\<<\<<\<< EOF" >> "${coreCov}/reports" +# - codecov/upload: +# file: '/home/circleci/repo/platform/core/coverage/reports' +# flags: 'core' +# +# ### +# # Workflow: PR_OPTIONAL_DOCKER_PUBLISH +# ### +# DOCKER_PR_PUBLISH: +# <<: *defaults +# steps: +# # Enable yarn workspaces +# - run: yarn config set workspaces-experimental true +# +# # Checkout code and ALL Git Tags +# - checkout: +# post: +# - git fetch --all +# +# - restore_cache: +# name: Restore Yarn and Cypress Package Cache +# keys: +# # when lock file changes, use increasingly general patterns to restore cache +# - yarn-packages-{{ checksum "yarn.lock" }} +# - yarn-packages- +# +# - run: +# name: Install Dependencies +# command: yarn install --frozen-lockfile +# +# - setup_remote_docker: +# docker_layer_caching: false +# +# - run: +# name: Build and push Docker image +# command: | +# # Remove npm config +# rm -f ./.npmrc +# # Set our version number using vars +# echo $CIRCLE_BUILD_NUM +# # Build our image, auth, and push +# docker build --tag ohif/viewer:PR_BUILD-$CIRCLE_BUILD_NUM . +# echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin +# docker push ohif/viewer:PR_BUILD-$CIRCLE_BUILD_NUM +# +# ### +# # Workflow: DEPLOY +# ### +# BUILD: +# <<: *defaults +# steps: +# # Checkout code and ALL Git Tags +# - checkout: +# post: +# - git fetch --all +# - restore_cache: +# name: Restore Yarn and Cypress Package Cache +# keys: +# # when lock file changes, use increasingly general patterns to restore cache +# - yarn-packages-{{ checksum "yarn.lock" }} +# - yarn-packages- +# - run: +# name: Install Dependencies +# command: yarn install --frozen-lockfile +# - save_cache: +# name: Save Yarn Package Cache +# paths: +# - ~/.cache ## Cache yarn and Cypress +# key: yarn-packages-{{ checksum "yarn.lock" }} +# # Build & Test +# - run: +# name: 'Build the OHIF Viewer' +# command: yarn run build +# no_output_timeout: 45m +# # - run: +# # name: 'Upload SourceMaps, Send Deploy Notification' +# # command: | +# # # export FILE_1=$(find ./build/static/js -type f -name "2.*.js" -exec basename {} \;) +# # # export FILE_MAIN=$(find ./build/static/js -type f -name "main.*.js" -exec basename {} \;) +# # # export FILE_RUNTIME_MAIN=$(find ./build/static/js -type f -name "runtime~main.*.js" -exec basename {} \;) +# # # curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_1.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_1 +# # # curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_MAIN.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_MAIN +# # # curl https://api.rollbar.com/api/1/sourcemap -F source_map=@build/static/js/$FILE_RUNTIME_MAIN.map -F access_token=$ROLLBAR_TOKEN -F version=$CIRCLE_SHA1 -F minified_url=https://$GOOGLE_STORAGE_BUCKET/static/js/$FILE_RUNTIME_MAIN +# # curl --request POST https://api.rollbar.com/api/1/deploy/ -F access_token=$ROLLBAR_TOKEN -F environment=$GOOGLE_STORAGE_BUCKET -F revision=$CIRCLE_SHA1 -F local_username=CircleCI +# # Persist :+1: +# - persist_to_workspace: +# root: ~/repo +# paths: +# - platform/viewer/dist +# - netlify.toml +# - .netlify +# +# DEPLOY_TO_DEV: +# docker: +# - image: circleci/node:12.9.1 +# environment: +# TERM: xterm +# NETLIFY_SITE_ID: 32708787-c9b0-4634-b50f-7ca41952da77 +# working_directory: ~/repo +# steps: +# - attach_workspace: +# at: ~/repo +# - run: cd .netlify && npm install +# - run: +# cp .netlify/deploy-workflow/_redirects platform/viewer/dist/_redirects +# - run: cd .netlify && npm run deploy +# +# DEPLOY_TO_STAGING: +# docker: +# - image: circleci/node:12.9.1 +# environment: +# TERM: xterm +# NETLIFY_SITE_ID: c7502ae3-b150-493c-8422-05701e44a969 +# working_directory: ~/repo +# steps: +# - attach_workspace: +# at: ~/repo +# - run: cd .netlify && npm install +# - run: +# cp .netlify/deploy-workflow/_redirects platform/viewer/dist/_redirects +# - run: cd .netlify && npm run deploy +# +# DEPLOY_TO_PRODUCTION: +# docker: +# - image: circleci/node:12.9.1 +# environment: +# TERM: xterm +# NETLIFY_SITE_ID: 79c4a5da-5c95-4dc9-84f7-45fd9dfe21b0 +# working_directory: ~/repo +# steps: +# - attach_workspace: +# at: ~/repo +# - run: cd .netlify && npm install +# - run: +# cp .netlify/deploy-workflow/_redirects platform/viewer/dist/_redirects +# - run: cd .netlify && npm run deploy +# +# ### +# # Workflow: RELEASE +# ### +# NPM_PUBLISH: +# <<: *defaults +# steps: +# - run: yarn -v +# # Checkout code and ALL Git Tags +# - checkout: +# post: +# - git fetch --all +# # Use increasingly general patterns to restore cache +# - restore_cache: +# name: Restore Yarn and Cypress Package Cache +# keys: +# - yarn-packages-{{ checksum "yarn.lock" }} +# - yarn-packages- +# - run: +# name: Install Dependencies +# command: yarn install --frozen-lockfile +# - save_cache: +# name: Save Yarn Package Cache +# paths: +# - ~/.cache/yarn +# key: yarn-packages-{{ checksum "yarn.lock" }} +# - run: +# name: Avoid hosts unknown for github +# command: | +# rm -rf ~/.ssh +# mkdir ~/.ssh/ +# echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config +# git config --global user.email "danny.ri.brown+ohif-bot@gmail.com" +# git config --global user.name "ohif-bot" +# - run: +# name: Authenticate with NPM registry +# command: +# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc +# - run: npx lerna version +# - run: npx lerna publish from-package +# - persist_to_workspace: +# root: ~/repo +# paths: . +# +# DOCS_PUBLISH: +# <<: *defaults +# steps: +# - checkout +# - run: +# name: Avoid hosts unknown for github +# command: | +# rm -rf ~/.ssh +# mkdir ~/.ssh/ +# echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config +# git config --global user.email "danny.ri.brown+ohif-bot@gmail.com" +# git config --global user.name "ohif-bot" +# - run: yarn global add gitbook-cli gh-pages +# - run: chmod +x ~/repo/.circleci/build-and-publish-docs.sh +# - run: ~/repo/.circleci/build-and-publish-docs.sh +# +# DOCKER_MASTER_PUBLISH: +# <<: *defaults +# steps: +# - attach_workspace: +# at: ~/repo +# - setup_remote_docker: +# docker_layer_caching: false +# - run: +# name: Build and push Docker image +# command: | +# # This file will exist if a new version was published by +# # our command in the previous job. Created in npm postpublish hook +# # in the `platform/viewer` project. +# if [[ ! -e platform/viewer/success_version.txt ]]; then +# exit 0 +# else +# # Remove npm config +# rm -f ./.npmrc +# # Set our version number using vars +# export IMAGE_VERSION=$(cat platform/viewer/success_version.txt) +# export IMAGE_VERSION_FULL=v$IMAGE_VERSION.${CIRCLE_BUILD_NUM} +# echo $IMAGE_VERSION +# echo $IMAGE_VERSION_FULL +# # Build our image, auth, and push +# docker build --tag ohif/$IMAGE_NAME:$IMAGE_VERSION_FULL --tag ohif/$IMAGE_NAME:latest . +# echo $DOCKER_PWD | docker login -u $DOCKER_LOGIN --password-stdin +# docker push ohif/$IMAGE_NAME:$IMAGE_VERSION_FULL +# docker push ohif/$IMAGE_NAME:latest +# fi +# +#workflows: +# version: 2 +# +# PR_CHECKS: +# jobs: +# - UNIT_TESTS: +# filters: +# branches: +# ignore: +# - master +# - feature/* +# - hotfix/* +# # E2E: PWA +# - cypress/run: +# name: 'E2E: PWA' +# executor: cypress/browsers-chrome76 +# browser: chrome +# pre-steps: +# - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global +# add wait-on' # Use yarn latest +# yarn: true +# record: false +# store_artifacts: false +# working_directory: platform/viewer +# build: npx cross-env QUICK_BUILD=true yarn run build +# start: yarn run test:e2e:serve +# spec: 'cypress/integration/common/**/*,cypress/integration/pwa/**/*' +# wait-on: 'http://localhost:3000' +# cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' +# no-workspace: true # Don't persist workspace +# post-steps: +# - store_artifacts: +# path: platform/viewer/cypress/screenshots +# - store_artifacts: +# path: platform/viewer/cypress/videos +# requires: +# - UNIT_TESTS +# # E2E: script-tag +# - cypress/run: +# name: 'E2E: Script Tag' +# executor: cypress/browsers-chrome76 +# browser: chrome +# pre-steps: +# - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global +# add wait-on' # Use yarn latest +# yarn: true +# record: false +# store_artifacts: false +# working_directory: platform/viewer +# build: npx cross-env QUICK_BUILD=true yarn run build:package +# start: yarn run test:e2e:serve +# spec: 'cypress/integration/common/**/*,cypress/integration/script-tag/**/*' +# wait-on: 'http://localhost:3000' +# cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' +# no-workspace: true # Don't persist workspace +# post-steps: +# - store_artifacts: +# path: platform/viewer/cypress/screenshots +# - store_artifacts: +# path: platform/viewer/cypress/videos +# requires: +# - UNIT_TESTS +# +# PR_OPTIONAL_VISUAL_TESTS: +# jobs: +# - AWAIT_APPROVAL: +# type: approval +# # Update hub.docker.org +# - cypress/run: +# name: 'Generate Percy Snapshots' +# executor: cypress/browsers-chrome76 +# browser: chrome +# pre-steps: +# - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global +# add wait-on' # Use yarn latest +# yarn: true +# store_artifacts: false +# working_directory: platform/viewer +# build: npx cross-env QUICK_BUILD=true yarn run build +# # start server --> verify running --> percy + chrome + cypress +# command: yarn run test:e2e:dist +# cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' +# no-workspace: true # Don't persist workspace +# post-steps: +# - store_artifacts: +# path: platform/viewer/cypress/screenshots +# - store_artifacts: +# path: platform/viewer/cypress/videos +# requires: +# - AWAIT_APPROVAL +# +# PR_OPTIONAL_DOCKER_PUBLISH: +# jobs: +# # https://circleci.com/docs/2.0/workflows/#holding-a-workflow-for-a-manual-approval +# - AWAIT_APPROVAL: +# type: approval +# # Update hub.docker.org +# - DOCKER_PR_PUBLISH: +# context: Docker Hub +# requires: +# - AWAIT_APPROVAL +# +# ### +# # Our workflow for building, deploying, and promoting builds across our +# # development, staging, and production environments. +# ### +# DEPLOY: +# jobs: +# - BUILD: +# filters: +# branches: +# only: master +# - DEPLOY_TO_DEV: +# requires: +# - BUILD +# - PROMOTE_TO_STAGING: +# type: approval +# requires: +# - DEPLOY_TO_DEV +# - DEPLOY_TO_STAGING: +# requires: +# - PROMOTE_TO_STAGING +# - PROMOTE_TO_PRODUCTION: +# type: approval +# requires: +# - DEPLOY_TO_STAGING +# - DEPLOY_TO_PRODUCTION: +# requires: +# - PROMOTE_TO_PRODUCTION +# ### +# # Unit and E2E tests have already run for PR_CHECKS +# # Re-running should not gain us any confidence here +# ### +# RELEASE: +# jobs: +# - NPM_PUBLISH: +# filters: +# branches: +# only: master +# - DOCS_PUBLISH: +# filters: +# branches: +# only: master +# # Update base branch snapshots +# # and record a Cypress dashboard test run +# - cypress/run: +# name: 'Generate Percy Snapshots' +# executor: cypress/browsers-chrome76 +# browser: chrome +# pre-steps: +# - run: 'rm -rf ~/.yarn && npm i -g yarn && yarn -v && yarn global +# add wait-on' # Use yarn latest +# yarn: true +# store_artifacts: false +# working_directory: platform/viewer +# build: npx cross-env QUICK_BUILD=true yarn run build +# # start server --> verify running --> percy + chrome + cypress +# command: yarn run test:e2e:dist +# cache-key: 'yarn-packages-{{ checksum "yarn.lock" }}' +# no-workspace: true # Don't persist workspace +# post-steps: +# - store_artifacts: +# path: platform/viewer/cypress/screenshots +# - store_artifacts: +# path: platform/viewer/cypress/videos +# - store_test_results: +# path: platform/viewer/cypress/results +# filters: +# branches: +# only: master +# - DOCKER_MASTER_PUBLISH: +# requires: +# - NPM_PUBLISH diff --git a/extensions/cornerstone/src/toolbarModule.js b/extensions/cornerstone/src/toolbarModule.js index 801466f9b08..fa485db9d1a 100644 --- a/extensions/cornerstone/src/toolbarModule.js +++ b/extensions/cornerstone/src/toolbarModule.js @@ -53,15 +53,6 @@ const definitions = [ commandName: 'setToolActive', commandOptions: { toolName: 'Zoom' }, }, - { - id: 'Wwwc', - label: 'Levels', - icon: 'level', - // - type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, - commandName: 'setToolActive', - commandOptions: { toolName: 'Wwwc' }, - }, { id: 'Pan', label: 'Pan', @@ -72,31 +63,30 @@ const definitions = [ commandOptions: { toolName: 'Pan' }, }, { - id: 'Length', - label: 'Length', - icon: 'measure-temp', + id: 'Wwwc', + label: 'Levels', + icon: 'level', // type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, commandName: 'setToolActive', - commandOptions: { toolName: 'Length' }, + commandOptions: { toolName: 'Wwwc' }, }, { - id: 'ArrowAnnotate', - label: 'Annotate', - icon: 'measure-non-target', + id: 'WwwcRegion', + label: 'ROI Window', + icon: 'stop', // type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, commandName: 'setToolActive', - commandOptions: { toolName: 'ArrowAnnotate' }, + commandOptions: { toolName: 'WwwcRegion' }, }, { - id: 'Angle', - label: 'Angle', - icon: 'angle-left', + id: 'Invert', + label: 'Invert', + icon: 'adjust', // - type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, - commandName: 'setToolActive', - commandOptions: { toolName: 'Angle' }, + type: TOOLBAR_BUTTON_TYPES.COMMAND, + commandName: 'invertViewport', }, { id: 'Reset', @@ -130,50 +120,6 @@ const definitions = [ commandName: 'setToolActive', commandOptions: { toolName: 'Magnify' }, }, - { - id: 'WwwcRegion', - label: 'ROI Window', - icon: 'stop', - // - type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, - commandName: 'setToolActive', - commandOptions: { toolName: 'WwwcRegion' }, - }, - { - id: 'DragProbe', - label: 'Probe', - icon: 'dot-circle', - // - type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, - commandName: 'setToolActive', - commandOptions: { toolName: 'DragProbe' }, - }, - { - id: 'EllipticalRoi', - label: 'Ellipse', - icon: 'circle-o', - // - type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, - commandName: 'setToolActive', - commandOptions: { toolName: 'EllipticalRoi' }, - }, - { - id: 'RectangleRoi', - label: 'Rectangle', - icon: 'square-o', - // - type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, - commandName: 'setToolActive', - commandOptions: { toolName: 'RectangleRoi' }, - }, - { - id: 'Invert', - label: 'Invert', - icon: 'adjust', - // - type: TOOLBAR_BUTTON_TYPES.COMMAND, - commandName: 'invertViewport', - }, { id: 'RotateRight', label: 'Rotate Right', @@ -198,23 +144,6 @@ const definitions = [ type: TOOLBAR_BUTTON_TYPES.COMMAND, commandName: 'flipViewportVertical', }, - { - id: 'Clear', - label: 'Clear', - icon: 'trash', - // - type: TOOLBAR_BUTTON_TYPES.COMMAND, - commandName: 'clearAnnotations', - }, - { - id: 'Bidirectional', - label: 'Bidirectional', - icon: 'measure-target', - // - type: TOOLBAR_BUTTON_TYPES.SET_TOOL_ACTIVE, - commandName: 'setToolActive', - commandOptions: { toolName: 'Bidirectional' }, - }, { id: 'Download', label: 'Download', diff --git a/extensions/vtk/CHANGELOG.md b/extensions/vtk/CHANGELOG.md index 39702e7286b..55ab8d43759 100644 --- a/extensions/vtk/CHANGELOG.md +++ b/extensions/vtk/CHANGELOG.md @@ -1,7 +1,7 @@ # Change Log -All notable changes to this project will be documented in this file. -See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +All notable changes to this project will be documented in this file. See +[Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.11.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.11.3...@ohif/extension-vtk@1.11.4) (2021-03-26) @@ -110,421 +110,237 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline ## [1.9.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.9.3...@ohif/extension-vtk@1.9.4) (2020-12-03) - ### Bug Fixes -* reset VOI on mpr reset ([#2115](https://github.com/OHIF/Viewers/issues/2115)) ([0baf18d](https://github.com/OHIF/Viewers/commit/0baf18dcb2985378016236b735329346a851e14f)) - - - - +- reset VOI on mpr reset ([#2115](https://github.com/OHIF/Viewers/issues/2115)) + ([0baf18d](https://github.com/OHIF/Viewers/commit/0baf18dcb2985378016236b735329346a851e14f)) ## [1.9.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.9.2...@ohif/extension-vtk@1.9.3) (2020-12-03) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.9.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.9.1...@ohif/extension-vtk@1.9.2) (2020-12-03) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.9.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.9.0...@ohif/extension-vtk@1.9.1) (2020-12-03) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [1.9.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.8.0...@ohif/extension-vtk@1.9.0) (2020-12-03) - ### Features -* Add error boundary and retry logic for network failures during dynamic imports ([#2145](https://github.com/OHIF/Viewers/issues/2145)) ([4c07904](https://github.com/OHIF/Viewers/commit/4c079044f6ae2381c6054d8d77414100152d1d19)) - - - - +- Add error boundary and retry logic for network failures during dynamic imports + ([#2145](https://github.com/OHIF/Viewers/issues/2145)) + ([4c07904](https://github.com/OHIF/Viewers/commit/4c079044f6ae2381c6054d8d77414100152d1d19)) # [1.8.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.16...@ohif/extension-vtk@1.8.0) (2020-11-30) - ### Features -* **i18n:** Added de (German) translations ([2fff2d5](https://github.com/OHIF/Viewers/commit/2fff2d511fa1d36bdd6476da4ffa5684bf55374f)) - - - - +- **i18n:** Added de (German) translations + ([2fff2d5](https://github.com/OHIF/Viewers/commit/2fff2d511fa1d36bdd6476da4ffa5684bf55374f)) ## [1.7.16](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.15...@ohif/extension-vtk@1.7.16) (2020-11-19) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.15](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.14...@ohif/extension-vtk@1.7.15) (2020-11-02) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.14](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.13...@ohif/extension-vtk@1.7.14) (2020-10-20) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.13](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.12...@ohif/extension-vtk@1.7.13) (2020-10-15) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.11...@ohif/extension-vtk@1.7.12) (2020-10-13) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.10...@ohif/extension-vtk@1.7.11) (2020-10-13) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.9...@ohif/extension-vtk@1.7.10) (2020-10-07) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.8...@ohif/extension-vtk@1.7.9) (2020-10-06) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.7...@ohif/extension-vtk@1.7.8) (2020-09-30) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.6...@ohif/extension-vtk@1.7.7) (2020-09-17) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.5...@ohif/extension-vtk@1.7.6) (2020-09-10) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.4...@ohif/extension-vtk@1.7.5) (2020-09-03) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.3...@ohif/extension-vtk@1.7.4) (2020-09-03) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.2...@ohif/extension-vtk@1.7.3) (2020-09-02) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.1...@ohif/extension-vtk@1.7.2) (2020-08-28) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.7.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.7.0...@ohif/extension-vtk@1.7.1) (2020-08-24) - ### Bug Fixes -* 🐛 Fail gracefully on an MPR load error ([#1992](https://github.com/OHIF/Viewers/issues/1992)) ([779a7e0](https://github.com/OHIF/Viewers/commit/779a7e0976aa3a2d2bf1dc8f056950f0545c9fff)) - - - - +- 🐛 Fail gracefully on an MPR load error + ([#1992](https://github.com/OHIF/Viewers/issues/1992)) + ([779a7e0](https://github.com/OHIF/Viewers/commit/779a7e0976aa3a2d2bf1dc8f056950f0545c9fff)) # [1.7.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.10...@ohif/extension-vtk@1.7.0) (2020-08-18) - ### Features -* 🎸 Update react-vtkjs-viewport usage to use requestPool ([#1984](https://github.com/OHIF/Viewers/issues/1984)) ([bb5f30c](https://github.com/OHIF/Viewers/commit/bb5f30ce2a0192d2e021beaaadfff22fd38e17b9)) - - - - +- 🎸 Update react-vtkjs-viewport usage to use requestPool + ([#1984](https://github.com/OHIF/Viewers/issues/1984)) + ([bb5f30c](https://github.com/OHIF/Viewers/commit/bb5f30ce2a0192d2e021beaaadfff22fd38e17b9)) ## [1.6.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.9...@ohif/extension-vtk@1.6.10) (2020-08-10) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.6.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.8...@ohif/extension-vtk@1.6.9) (2020-07-23) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.6.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.7...@ohif/extension-vtk@1.6.8) (2020-07-22) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.6.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.6...@ohif/extension-vtk@1.6.7) (2020-07-13) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.6.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.5...@ohif/extension-vtk@1.6.6) (2020-07-13) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.6.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.4...@ohif/extension-vtk@1.6.5) (2020-07-13) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.6.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.3...@ohif/extension-vtk@1.6.4) (2020-06-18) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.6.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.2...@ohif/extension-vtk@1.6.3) (2020-06-15) - ### Bug Fixes -* 🐛 Disable seg panel when data for seg unavailable ([#1732](https://github.com/OHIF/Viewers/issues/1732)) ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), closes [#1728](https://github.com/OHIF/Viewers/issues/1728) - - - - +- 🐛 Disable seg panel when data for seg unavailable + ([#1732](https://github.com/OHIF/Viewers/issues/1732)) + ([698e900](https://github.com/OHIF/Viewers/commit/698e900b85121d3c2a46747c443ef69fb7a8c95b)), + closes [#1728](https://github.com/OHIF/Viewers/issues/1728) ## [1.6.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.1...@ohif/extension-vtk@1.6.2) (2020-06-05) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.6.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.6.0...@ohif/extension-vtk@1.6.1) (2020-06-04) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [1.6.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.6...@ohif/extension-vtk@1.6.0) (2020-06-04) - ### Features -* 🎸 1729 - error boundary wrapper ([#1764](https://github.com/OHIF/Viewers/issues/1764)) ([c02b232](https://github.com/OHIF/Viewers/commit/c02b232b0cc24f38af5d5e3831d987d048e60ada)) - - - - +- 🎸 1729 - error boundary wrapper + ([#1764](https://github.com/OHIF/Viewers/issues/1764)) + ([c02b232](https://github.com/OHIF/Viewers/commit/c02b232b0cc24f38af5d5e3831d987d048e60ada)) ## [1.5.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.5...@ohif/extension-vtk@1.5.6) (2020-05-14) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.5.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.4...@ohif/extension-vtk@1.5.5) (2020-05-12) - ### Bug Fixes -* 🐛 Fix seg color load ([#1724](https://github.com/OHIF/Viewers/issues/1724)) ([c4f84b1](https://github.com/OHIF/Viewers/commit/c4f84b1174d04ba84d37ed89b6d7ab541be28181)) - - - - +- 🐛 Fix seg color load ([#1724](https://github.com/OHIF/Viewers/issues/1724)) + ([c4f84b1](https://github.com/OHIF/Viewers/commit/c4f84b1174d04ba84d37ed89b6d7ab541be28181)) ## [1.5.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.3...@ohif/extension-vtk@1.5.4) (2020-05-06) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.5.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.2...@ohif/extension-vtk@1.5.3) (2020-05-04) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.5.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.1...@ohif/extension-vtk@1.5.2) (2020-05-04) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.5.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.5.0...@ohif/extension-vtk@1.5.1) (2020-04-28) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [1.5.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.4.1...@ohif/extension-vtk@1.5.0) (2020-04-24) - ### Features -* 🎸 Seg jump to slice + show/hide ([835f64d](https://github.com/OHIF/Viewers/commit/835f64d47a9994f6a25aaf3941a4974e215e7e7f)) - - - - +- 🎸 Seg jump to slice + show/hide + ([835f64d](https://github.com/OHIF/Viewers/commit/835f64d47a9994f6a25aaf3941a4974e215e7e7f)) ## [1.4.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.4.0...@ohif/extension-vtk@1.4.1) (2020-04-23) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [1.4.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.14...@ohif/extension-vtk@1.4.0) (2020-04-23) - ### Features -* configuration to hook into XHR Error handling ([e96205d](https://github.com/OHIF/Viewers/commit/e96205de35e5bec14dc8a9a8509db3dd4e6ecdb6)) - - - - +- configuration to hook into XHR Error handling + ([e96205d](https://github.com/OHIF/Viewers/commit/e96205de35e5bec14dc8a9a8509db3dd4e6ecdb6)) ## [1.3.14](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.13...@ohif/extension-vtk@1.3.14) (2020-04-22) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.13](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.12...@ohif/extension-vtk@1.3.13) (2020-04-17) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.11...@ohif/extension-vtk@1.3.12) (2020-04-15) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.10...@ohif/extension-vtk@1.3.11) (2020-04-09) - ### Bug Fixes -* Revert "refactor: Reduce bundle size ([#1575](https://github.com/OHIF/Viewers/issues/1575))" ([#1622](https://github.com/OHIF/Viewers/issues/1622)) ([d21af3f](https://github.com/OHIF/Viewers/commit/d21af3f133492fa31492413b8782936c9ff18b44)) - - - - +- Revert "refactor: Reduce bundle size + ([#1575](https://github.com/OHIF/Viewers/issues/1575))" + ([#1622](https://github.com/OHIF/Viewers/issues/1622)) + ([d21af3f](https://github.com/OHIF/Viewers/commit/d21af3f133492fa31492413b8782936c9ff18b44)) ## [1.3.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.9...@ohif/extension-vtk@1.3.10) (2020-04-09) **Note:** Version bump only for package @ohif/extension-vtk - - - - # Change Log All notable changes to this project will be documented in this file. See @@ -534,84 +350,47 @@ All notable changes to this project will be documented in this file. See **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.7...@ohif/extension-vtk@1.3.8) (2020-04-02) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.6...@ohif/extension-vtk@1.3.7) (2020-04-02) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.5...@ohif/extension-vtk@1.3.6) (2020-04-01) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.4...@ohif/extension-vtk@1.3.5) (2020-03-25) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.3...@ohif/extension-vtk@1.3.4) (2020-03-24) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.2...@ohif/extension-vtk@1.3.3) (2020-03-24) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.1...@ohif/extension-vtk@1.3.2) (2020-03-23) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.3.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.3.0...@ohif/extension-vtk@1.3.1) (2020-03-17) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [1.3.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.24...@ohif/extension-vtk@1.3.0) (2020-03-13) - ### Features -* Segmentations Settings UI - Phase 1 [#1391](https://github.com/OHIF/Viewers/issues/1391) ([#1392](https://github.com/OHIF/Viewers/issues/1392)) ([e8842cf](https://github.com/OHIF/Viewers/commit/e8842cf8aebde98db7fc123e4867c8288552331f)), closes [#1423](https://github.com/OHIF/Viewers/issues/1423) - - - - +- Segmentations Settings UI - Phase 1 + [#1391](https://github.com/OHIF/Viewers/issues/1391) + ([#1392](https://github.com/OHIF/Viewers/issues/1392)) + ([e8842cf](https://github.com/OHIF/Viewers/commit/e8842cf8aebde98db7fc123e4867c8288552331f)), + closes [#1423](https://github.com/OHIF/Viewers/issues/1423) # Change Log @@ -622,423 +401,234 @@ All notable changes to this project will be documented in this file. See **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.23](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.22...@ohif/extension-vtk@1.2.23) (2020-03-09) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.22](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.21...@ohif/extension-vtk@1.2.22) (2020-03-06) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.21](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.20...@ohif/extension-vtk@1.2.21) (2020-02-29) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.20](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.19...@ohif/extension-vtk@1.2.20) (2020-02-21) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.19](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.18...@ohif/extension-vtk@1.2.19) (2020-02-20) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.18](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.17...@ohif/extension-vtk@1.2.18) (2020-02-12) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.17](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.16...@ohif/extension-vtk@1.2.17) (2020-02-10) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.16](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.15...@ohif/extension-vtk@1.2.16) (2020-02-10) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.15](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.14...@ohif/extension-vtk@1.2.15) (2020-02-07) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.14](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.13...@ohif/extension-vtk@1.2.14) (2020-02-06) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.13](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.12...@ohif/extension-vtk@1.2.13) (2020-01-30) - ### Bug Fixes -* Set VTK viewport as active by interaction ([#1139](https://github.com/OHIF/Viewers/issues/1139)) ([686d12d](https://github.com/OHIF/Viewers/commit/686d12da5c9d3d435b1e326c2a5caee36e2ed27c)) - - - - +- Set VTK viewport as active by interaction + ([#1139](https://github.com/OHIF/Viewers/issues/1139)) + ([686d12d](https://github.com/OHIF/Viewers/commit/686d12da5c9d3d435b1e326c2a5caee36e2ed27c)) ## [1.2.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.11...@ohif/extension-vtk@1.2.12) (2020-01-30) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.10...@ohif/extension-vtk@1.2.11) (2020-01-28) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.9...@ohif/extension-vtk@1.2.10) (2020-01-28) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.8...@ohif/extension-vtk@1.2.9) (2020-01-27) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.7...@ohif/extension-vtk@1.2.8) (2020-01-24) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.6...@ohif/extension-vtk@1.2.7) (2020-01-08) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.5...@ohif/extension-vtk@1.2.6) (2020-01-07) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.4...@ohif/extension-vtk@1.2.5) (2020-01-06) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.3...@ohif/extension-vtk@1.2.4) (2019-12-30) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.2...@ohif/extension-vtk@1.2.3) (2019-12-20) - ### Bug Fixes -* 🐛 1241: Make Plugin switch part of ToolbarModule ([#1322](https://github.com/OHIF/Viewers/issues/1322)) ([6540e36](https://github.com/OHIF/Viewers/commit/6540e36818944ac2eccc696186366ae495b33a04)), closes [#1241](https://github.com/OHIF/Viewers/issues/1241) - - - - +- 🐛 1241: Make Plugin switch part of ToolbarModule + ([#1322](https://github.com/OHIF/Viewers/issues/1322)) + ([6540e36](https://github.com/OHIF/Viewers/commit/6540e36818944ac2eccc696186366ae495b33a04)), + closes [#1241](https://github.com/OHIF/Viewers/issues/1241) ## [1.2.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.1...@ohif/extension-vtk@1.2.2) (2019-12-20) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.2.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.0...@ohif/extension-vtk@1.2.1) (2019-12-20) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [1.2.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.1.7...@ohif/extension-vtk@1.2.0) (2019-12-20) - ### Features -* 🎸 Configuration so viewer tools can nix handles ([#1304](https://github.com/OHIF/Viewers/issues/1304)) ([63594d3](https://github.com/OHIF/Viewers/commit/63594d36b0bdba59f0901095aed70b75fb05172d)), closes [#1223](https://github.com/OHIF/Viewers/issues/1223) - - - - +- 🎸 Configuration so viewer tools can nix handles + ([#1304](https://github.com/OHIF/Viewers/issues/1304)) + ([63594d3](https://github.com/OHIF/Viewers/commit/63594d36b0bdba59f0901095aed70b75fb05172d)), + closes [#1223](https://github.com/OHIF/Viewers/issues/1223) ## [1.1.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.1.6...@ohif/extension-vtk@1.1.7) (2019-12-19) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.1.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.1.5...@ohif/extension-vtk@1.1.6) (2019-12-18) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.1.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.1.4...@ohif/extension-vtk@1.1.5) (2019-12-16) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.1.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.1.3...@ohif/extension-vtk@1.1.4) (2019-12-16) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.1.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.1.2...@ohif/extension-vtk@1.1.3) (2019-12-13) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.1.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.1.1...@ohif/extension-vtk@1.1.2) (2019-12-12) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.1.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.1.0...@ohif/extension-vtk@1.1.1) (2019-12-11) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [1.1.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.0.2...@ohif/extension-vtk@1.1.0) (2019-12-11) - ### Features -* 🎸 DICOM SR STOW on MeasurementAPI ([#954](https://github.com/OHIF/Viewers/issues/954)) ([ebe1af8](https://github.com/OHIF/Viewers/commit/ebe1af8d4f75d2483eba869655906d7829bd9666)), closes [#758](https://github.com/OHIF/Viewers/issues/758) - - - - +- 🎸 DICOM SR STOW on MeasurementAPI + ([#954](https://github.com/OHIF/Viewers/issues/954)) + ([ebe1af8](https://github.com/OHIF/Viewers/commit/ebe1af8d4f75d2483eba869655906d7829bd9666)), + closes [#758](https://github.com/OHIF/Viewers/issues/758) ## [1.0.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.0.1...@ohif/extension-vtk@1.0.2) (2019-12-11) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [1.0.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.0.0...@ohif/extension-vtk@1.0.1) (2019-12-09) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [1.0.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.54.6...@ohif/extension-vtk@1.0.0) (2019-12-09) - -* feat!: Ability to configure cornerstone tools via extension configuration (#1229) ([55a5806](https://github.com/OHIF/Viewers/commit/55a580659ecb74ca6433461d8f9a05c2a2b69533)), closes [#1229](https://github.com/OHIF/Viewers/issues/1229) - +- feat!: Ability to configure cornerstone tools via extension configuration + (#1229) + ([55a5806](https://github.com/OHIF/Viewers/commit/55a580659ecb74ca6433461d8f9a05c2a2b69533)), + closes [#1229](https://github.com/OHIF/Viewers/issues/1229) ### BREAKING CHANGES -* modifies the exposed react components props. The contract for providing configuration for the app has changed. Please reference updated documentation for guidance. - - - - +- modifies the exposed react components props. The contract for + providing configuration for the app has changed. Please reference updated + documentation for guidance. ## [0.54.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.54.5...@ohif/extension-vtk@0.54.6) (2019-12-07) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.54.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.54.4...@ohif/extension-vtk@0.54.5) (2019-12-07) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.54.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.54.3...@ohif/extension-vtk@0.54.4) (2019-12-07) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.54.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.54.2...@ohif/extension-vtk@0.54.3) (2019-12-06) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.54.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.54.1...@ohif/extension-vtk@0.54.2) (2019-12-02) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.54.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.54.0...@ohif/extension-vtk@0.54.1) (2019-11-28) **Note:** Version bump only for package @ohif/extension-vtk - - - - # [0.54.0](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.13...@ohif/extension-vtk@0.54.0) (2019-11-25) - ### Features -* Add new annotate tool using new dialog service ([#1211](https://github.com/OHIF/Viewers/issues/1211)) ([8fd3af1](https://github.com/OHIF/Viewers/commit/8fd3af1e137e793f1b482760a22591c64a072047)) - - - - +- Add new annotate tool using new dialog service + ([#1211](https://github.com/OHIF/Viewers/issues/1211)) + ([8fd3af1](https://github.com/OHIF/Viewers/commit/8fd3af1e137e793f1b482760a22591c64a072047)) ## [0.53.13](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.12...@ohif/extension-vtk@0.53.13) (2019-11-25) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.53.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.11...@ohif/extension-vtk@0.53.12) (2019-11-20) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.53.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.10...@ohif/extension-vtk@0.53.11) (2019-11-19) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.53.10](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.9...@ohif/extension-vtk@0.53.10) (2019-11-19) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.53.9](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.8...@ohif/extension-vtk@0.53.9) (2019-11-18) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.53.8](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.7...@ohif/extension-vtk@0.53.8) (2019-11-15) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.53.7](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.6...@ohif/extension-vtk@0.53.7) (2019-11-15) **Note:** Version bump only for package @ohif/extension-vtk - - - - ## [0.53.6](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@0.53.5...@ohif/extension-vtk@0.53.6) (2019-11-14) **Note:** Version bump only for package @ohif/extension-vtk diff --git a/idc-assets/IDC-Logo-WHITE.svg b/idc-assets/IDC-Logo-WHITE.svg new file mode 100644 index 00000000000..f25418d300d --- /dev/null +++ b/idc-assets/IDC-Logo-WHITE.svg @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/idc-assets/app-config-template.js b/idc-assets/app-config-template.js new file mode 100644 index 00000000000..405fbf40219 --- /dev/null +++ b/idc-assets/app-config-template.js @@ -0,0 +1,151 @@ +window.config = { + // default: '/' + routerBasename: '/', + extensions: [], + disableMeasurementPanel: true, + splitQueryParameterCalls: true, + showStudyList: false, + filterQueryParam: true, + httpErrorHandler: error => { + // This is 429 when rejected from the public idc sandbox too often. + console.warn(error.status); + if (error.status == 429) { + // Could use services manager here to bring up a dialog/modal if needed. + // console.warn('test, navigate to https://ohif.org/'); + window.location = '_X___IDC__Z__QUOTA___Y_'; + } + }, + servers: { + dicomWeb: [ + { + name: 'IDC', + wadoUriRoot: '_X___IDC__Z__ROOT___Y_', + qidoRoot: '_X___IDC__Z__ROOT___Y_', + wadoRoot: '_X___IDC__Z__ROOT___Y_', + qidoSupportsIncludeField: true, + imageRendering: 'wadors', + thumbnailRendering: 'wadors', + enableStudyLazyLoad: true, + }, + ], + }, + // Extensions should be able to suggest default values for these? + // Or we can require that these be explicitly set + hotkeys: [ + // ~ Global + { + commandName: 'incrementActiveViewport', + label: 'Next Viewport', + keys: ['right'], + }, + { + commandName: 'decrementActiveViewport', + label: 'Previous Viewport', + keys: ['left'], + }, + // Supported Keys: https://craig.is/killing/mice + // ~ Cornerstone Extension + { commandName: 'rotateViewportCW', label: 'Rotate Right', keys: ['r'] }, + { commandName: 'rotateViewportCCW', label: 'Rotate Left', keys: ['l'] }, + { commandName: 'invertViewport', label: 'Invert', keys: ['i'] }, + { + commandName: 'flipViewportVertical', + label: 'Flip Horizontally', + keys: ['h'], + }, + { + commandName: 'flipViewportHorizontal', + label: 'Flip Vertically', + keys: ['v'], + }, + { commandName: 'scaleUpViewport', label: 'Zoom In', keys: ['+'] }, + { commandName: 'scaleDownViewport', label: 'Zoom Out', keys: ['-'] }, + { commandName: 'fitViewportToWindow', label: 'Zoom to Fit', keys: ['='] }, + { commandName: 'resetViewport', label: 'Reset', keys: ['space'] }, + // clearAnnotations + { commandName: 'nextImage', label: 'Next Image', keys: ['down'] }, + { commandName: 'previousImage', label: 'Previous Image', keys: ['up'] }, + // firstImage + // lastImage + { + commandName: 'previousViewportDisplaySet', + label: 'Previous Series', + keys: ['pagedown'], + }, + { + commandName: 'nextViewportDisplaySet', + label: 'Next Series', + keys: ['pageup'], + }, + // ~ Cornerstone Tools + { commandName: 'setZoomTool', label: 'Zoom', keys: ['z'] }, + // ~ Window level presets + { + commandName: 'windowLevelPreset1', + label: 'W/L Preset 1', + keys: ['1'], + }, + { + commandName: 'windowLevelPreset2', + label: 'W/L Preset 2', + keys: ['2'], + }, + { + commandName: 'windowLevelPreset3', + label: 'W/L Preset 3', + keys: ['3'], + }, + { + commandName: 'windowLevelPreset4', + label: 'W/L Preset 4', + keys: ['4'], + }, + { + commandName: 'windowLevelPreset5', + label: 'W/L Preset 5', + keys: ['5'], + }, + { + commandName: 'windowLevelPreset6', + label: 'W/L Preset 6', + keys: ['6'], + }, + { + commandName: 'windowLevelPreset7', + label: 'W/L Preset 7', + keys: ['7'], + }, + { + commandName: 'windowLevelPreset8', + label: 'W/L Preset 8', + keys: ['8'], + }, + { + commandName: 'windowLevelPreset9', + label: 'W/L Preset 9', + keys: ['9'], + }, + ], + cornerstoneExtensionConfig: {}, + + whiteLabeling: { + /* Optional: Should return a React component to be rendered in the "Logo" section of the application's Top Navigation bar */ + createLogoComponentFn: function(React) { + return React.createElement('a', { + target: '_self', + rel: 'noopener noreferrer', + className: 'header-brand', + href: '_X___IDC__LOGO__LINK___Y_', + style: { + display: 'block', + textIndent: '-9999px', + background: 'url(/IDC-Logo-WHITE.svg)', + backgroundSize: 'contain', + backgroundRepeat: 'no-repeat', + width: '200px', + height: '45px', + }, + }); + }, + }, +}; diff --git a/idc-assets/favicon-nci-16x16.png b/idc-assets/favicon-nci-16x16.png new file mode 100644 index 00000000000..909b3542637 Binary files /dev/null and b/idc-assets/favicon-nci-16x16.png differ diff --git a/idc-assets/favicon-nci-32x32.png b/idc-assets/favicon-nci-32x32.png new file mode 100644 index 00000000000..c0a5d1f61fd Binary files /dev/null and b/idc-assets/favicon-nci-32x32.png differ diff --git a/idc-assets/favicon-nci.ico b/idc-assets/favicon-nci.ico new file mode 100644 index 00000000000..6a56fc2d0ff Binary files /dev/null and b/idc-assets/favicon-nci.ico differ diff --git a/idc-deploy-shell/buildViewer.sh b/idc-deploy-shell/buildViewer.sh new file mode 100644 index 00000000000..9a0de2e4284 --- /dev/null +++ b/idc-deploy-shell/buildViewer.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Copyright 2020, Institute for Systems Biology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +if [ "${CONFIG_ONLY}" != "True" ]; then + yarn install + yarn run build +else + mkdir -p platform/viewer/dist/ +fi diff --git a/idc-deploy-shell/cloudCopy.sh b/idc-deploy-shell/cloudCopy.sh new file mode 100644 index 00000000000..2ca58aa69c4 --- /dev/null +++ b/idc-deploy-shell/cloudCopy.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +# Copyright 2020, Institute for Systems Biology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +cd ~/Viewers/platform/viewer/dist/ +# Don't want to have to run whole script as sudo, so need to fix ownership here: +sudo chown -R circleci /home/circleci/.gsutil +sudo chgrp -R circleci /home/circleci/.gsutil + + +if [ "${CONFIG_ONLY}" != "True" ]; then + gsutil web set -m index.html -e index.html gs://${WBUCKET} + gsutil -h "Cache-Control:no-cache, max-age=0" rsync -d -r . gs://${WBUCKET} +else + gsutil cp app-config.js gs://${WBUCKET} + CACHE_SETTING="Cache-Control:no-cache, max-age=0" + gsutil setmeta -h "${CACHE_SETTING}" gs://${WBUCKET}/app-config.js +fi diff --git a/idc-deploy-shell/gcloud_authenticate.sh b/idc-deploy-shell/gcloud_authenticate.sh new file mode 100644 index 00000000000..9f30cb05e55 --- /dev/null +++ b/idc-deploy-shell/gcloud_authenticate.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +if [ ! -f "deployment.key.json" ]; then + echo ${DEPLOYMENT_KEY} | base64 --decode --ignore-garbage > deployment.key.json +fi + +gcloud auth activate-service-account --key-file deployment.key.json +echo "Setting deployment client email to ${DEPLOYMENT_CLIENT_EMAIL}" +gcloud auth list +echo "Return code for gcloud auth list is $?" + +gcloud config set account $DEPLOYMENT_CLIENT_EMAIL +gcloud config list +echo "Setting deployment project to ${DEPLOYMENT_PROJECT_ID}" +gcloud config set project "$DEPLOYMENT_PROJECT_ID" + +# +# This script is run as sudo, so make the gsutil stuff writable as circleci +mkdir -p /home/circleci/.config +mkdir -p /home/circleci/.gsutil +chown -R circleci /home/circleci/.config /home/circleci/.gsutil +chgrp -R circleci /home/circleci/.config /home/circleci/.gsutil diff --git a/idc-deploy-shell/install-deps.sh b/idc-deploy-shell/install-deps.sh new file mode 100644 index 00000000000..bf17fc6c637 --- /dev/null +++ b/idc-deploy-shell/install-deps.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Copyright 2020, Institute for Systems Biology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Note that CIRCLE_PROJECT_REPONAME is a Circle CI built-in var: +export HOME=/home/circleci/${CIRCLE_PROJECT_REPONAME} +export HOMEROOT=/home/circleci/${CIRCLE_PROJECT_REPONAME} + +# Install and update apt-get info +echo "Preparing System..." +apt-get -y install software-properties-common +apt-get update -qq +apt-get upgrade -y + +apt-get install -y git +apt-get install -y make # needed by yarn install... +apt-get install -y g++ # needed by yarn install... + +# +# Following instructions at https://classic.yarnpkg.com/ and +# https://github.com/nodesource/distributions/blob/master/README.md#deb +# + +curl -sL https://deb.nodesource.com/setup_14.x | bash - +apt-get install -y nodejs + +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - +echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list +apt-get install -y yarn + +# See https://github.com/yarnpkg/yarn/issues/3708: +apt-get remove cmdinstall +apt update +apt-get install -y yarn + +yarn config set workspaces-experimental true + +echo "Libraries Installed" diff --git a/idc-deploy-shell/killPing.sh b/idc-deploy-shell/killPing.sh new file mode 100755 index 00000000000..b41e7be1891 --- /dev/null +++ b/idc-deploy-shell/killPing.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +PJPID=`ps -al | grep -i pingJob | grep -v grep | awk '{print $2}'` +if [ -n "${PJPID}" ]; then + kill ${PJPID} +fi diff --git a/idc-deploy-shell/pingJob.sh b/idc-deploy-shell/pingJob.sh new file mode 100755 index 00000000000..ff6d4c4c1f8 --- /dev/null +++ b/idc-deploy-shell/pingJob.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +echo '...' +for i in {1..15}; do + sleep 60 + echo '...' +done diff --git a/idc-deploy-shell/prepare_config.sh b/idc-deploy-shell/prepare_config.sh new file mode 100644 index 00000000000..94e5e7613f0 --- /dev/null +++ b/idc-deploy-shell/prepare_config.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Copyright 2020, Institute for Systems Biology +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +cat idc-assets/app-config-template.js | \ + sed "s#_X___IDC__Z__ROOT___Y_#${STORE_ROOT}#" | \ + sed "s#_X___IDC__Z__QUOTA___Y_#${QUOTA_PAGE}#" | \ + sed "s#_X___IDC__LOGO__LINK___Y_#${LOGO_LINK}#" + + + diff --git a/idc-deploy-shell/pull_config.sh b/idc-deploy-shell/pull_config.sh new file mode 100644 index 00000000000..05f0ee08bf9 --- /dev/null +++ b/idc-deploy-shell/pull_config.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +if [ ! -f "/home/circleci/${CIRCLE_PROJECT_REPONAME}/viewer_deployment_config.txt" ]; then + gsutil cp gs://${DEPLOYMENT_BUCKET}/viewer_deployment_config.txt /home/circleci/${CIRCLE_PROJECT_REPONAME}/ + chmod ugo+r /home/circleci/${CIRCLE_PROJECT_REPONAME}/viewer_deployment_config.txt + if [ ! -f "/home/circleci/${CIRCLE_PROJECT_REPONAME}/viewer_deployment_config.txt" ]; then + echo "[ERROR] Couldn't assign viewer deployment configuration file - exiting." + exit 1 + fi +else + echo "Found deployment configuration file." +fi diff --git a/platform/core/src/DICOMSR/parseDicomStructuredReport.js b/platform/core/src/DICOMSR/parseDicomStructuredReport.js index df5770364b9..b870f60dd29 100644 --- a/platform/core/src/DICOMSR/parseDicomStructuredReport.js +++ b/platform/core/src/DICOMSR/parseDicomStructuredReport.js @@ -2,6 +2,8 @@ import dcmjs from 'dcmjs'; import findInstanceMetadataBySopInstanceUID from './utils/findInstanceMetadataBySopInstanceUid'; +const toArray = x => (Array.isArray(x) ? x : [x]); + /** * Function to parse the part10 array buffer that comes from a DICOM Structured report into measurementData * measurementData format is a viewer specific format to be stored into the redux and consumed by other components @@ -21,7 +23,54 @@ const parseDicomStructuredReport = (part10SRArrayBuffer, displaySets) => { const { MeasurementReport } = dcmjs.adapters.Cornerstone; const storedMeasurementByToolType = MeasurementReport.generateToolState( - dataset + dataset, + { + getToolClass: (measurementGroup, dataset, toolClasses) => { + const measurementGroupContentSequence = toArray( + measurementGroup.ContentSequence + ); + + const CrowdsCureCancer = { + identifiers: ['99CCC', 'crowds-cure', 'Crowds Cure Cancer'], + LONG_AXIS: 'G-A185', + SHORT_AXIS: 'G-A186', + FINDING_SITE: 'G-C0E3', + LENGTH: 'G-D7FE', + }; + + const isCrowdsCureCancer = CrowdsCureCancer.identifiers.some( + identifier => JSON.stringify(dataset).includes(identifier) + ); + + if (isCrowdsCureCancer) { + const ShortAxisContentItem = measurementGroupContentSequence.find( + contentItem => + contentItem.ConceptNameCodeSequence.CodeValue === + CrowdsCureCancer.SHORT_AXIS + ); + + const LongAxisContentItem = measurementGroupContentSequence.find( + contentItem => + contentItem.ConceptNameCodeSequence.CodeValue === + CrowdsCureCancer.LONG_AXIS + ); + + const LengthContentItem = measurementGroupContentSequence.find( + contentItem => + contentItem.ConceptNameCodeSequence.CodeValue === + CrowdsCureCancer.LENGTH + ); + + if (ShortAxisContentItem && LongAxisContentItem) { + return toolClasses.find(t => t.toolType === 'Bidirectional'); + } + + if (LengthContentItem) { + return toolClasses.find(t => t.toolType === 'Length'); + } + } + }, + } ); const measurementData = {}; let measurementNumber = 0; diff --git a/platform/ui/src/elements/Icon/getIcon.js b/platform/ui/src/elements/Icon/getIcon.js index f5c861c1039..e680f9590c7 100644 --- a/platform/ui/src/elements/Icon/getIcon.js +++ b/platform/ui/src/elements/Icon/getIcon.js @@ -114,6 +114,7 @@ const ICONS = { 'angle-double-up': angleDoubleUp, 'arrows-alt-h': arrowsAltH, 'arrows-alt-v': arrowsAltV, + clipboard: clipboard, bars, 'caret-down': caretDown, 'caret-up': caretUp, diff --git a/platform/viewer/public/config/idc.js b/platform/viewer/public/config/idc.js index e1ec83799c9..3b07bd706c8 100644 --- a/platform/viewer/public/config/idc.js +++ b/platform/viewer/public/config/idc.js @@ -5,6 +5,7 @@ window.config = function(props) { disableMeasurementPanel: true, routerBasename: '/', enableGoogleCloudAdapter: true, + disableMeasurementPanel: true, splitQueryParameterCalls: true, // Allows the user to split QIDO SeriesInstanceUID filters into multiple calls, if the server does not support multi-valued query parameters. enableGoogleCloudAdapterUI: false, showStudyList: true, diff --git a/platform/viewer/public/html-templates/index.html b/platform/viewer/public/html-templates/index.html index a01ca7aa3c4..7c78d182bcb 100644 --- a/platform/viewer/public/html-templates/index.html +++ b/platform/viewer/public/html-templates/index.html @@ -2,11 +2,28 @@ + + + + + - + diff --git a/platform/viewer/src/connectedComponents/ViewerRetrieveStudyData.js b/platform/viewer/src/connectedComponents/ViewerRetrieveStudyData.js index d2902d5738b..0ad542ae284 100644 --- a/platform/viewer/src/connectedComponents/ViewerRetrieveStudyData.js +++ b/platform/viewer/src/connectedComponents/ViewerRetrieveStudyData.js @@ -259,7 +259,6 @@ function ViewerRetrieveStudyData({ ); setStudies([...studies, study]); - setIsStudyLoaded(true); }; /** @@ -295,13 +294,15 @@ function ViewerRetrieveStudyData({ setError(error); log.error(error); } + }) + .finally(() => { + setIsStudyLoaded(true); }); return study; }); setStudies(studies); - setIsStudyLoaded(true); } }; diff --git a/platform/viewer/src/index.js b/platform/viewer/src/index.js index cff2d6b32cb..96101fa5f6b 100644 --- a/platform/viewer/src/index.js +++ b/platform/viewer/src/index.js @@ -29,9 +29,9 @@ import OHIFDicomSegmentationExtension from '@ohif/extension-dicom-segmentation'; import OHIFDicomRtExtension from '@ohif/extension-dicom-rt'; import OHIFDicomMicroscopyExtension from '@ohif/extension-dicom-microscopy'; import OHIFDicomPDFExtension from '@ohif/extension-dicom-pdf'; -//import OHIFDicomTagBrowserExtension from '@ohif/extension-dicom-tag-browser'; +import OHIFDicomTagBrowserExtension from '@ohif/extension-dicom-tag-browser'; // Add this for Debugging purposes: -//import OHIFDebuggingExtension from '@ohif/extension-debugging'; +import OHIFDebuggingExtension from '@ohif/extension-debugging'; import { version } from '../package.json'; /* @@ -53,8 +53,15 @@ const appProps = { OHIFDicomPDFExtension, OHIFDicomSegmentationExtension, OHIFDicomRtExtension, - //OHIFDebuggingExtension, - //OHIFDicomTagBrowserExtension, + [ + OHIFDebuggingExtension, + { + mailTo: 'support@canceridc.dev', + debugModalMessage: + 'If the Send Bug Report button does not work, copy to clipboard and e-mail support@canceridc.dev.', + }, + ], + OHIFDicomTagBrowserExtension, ], };