diff --git a/.github/workflows/container-tests.yml b/.github/workflows/container-tests.yml index 7c320008..2071169c 100644 --- a/.github/workflows/container-tests.yml +++ b/.github/workflows/container-tests.yml @@ -27,8 +27,20 @@ jobs: - name: Test web page run: | - curl -sI http://localhost:8008/ | grep -o '200 OK' - curl -s http://localhost:8008/ | grep -o 'Slim' + # Poll: compose returns as soon as the container process starts, + # before nginx is listening (same flake as a bare curl right after up). + for i in $(seq 1 30); do + if curl -sI http://localhost:8008/ | grep -q '200 OK' \ + && curl -s http://localhost:8008/ | grep -q 'Slim'; then + echo "Slim web page ready" + exit 0 + fi + sleep 2 + done + echo "Slim web page did not become ready in time" + docker compose ps || true + docker compose logs --tail=80 app || true + exit 1 - name: Test DICOMweb service run: | diff --git a/.github/workflows/deploy-to-firebase.yml b/.github/workflows/deploy-to-firebase.yml index b56ecc4d..d622b870 100644 --- a/.github/workflows/deploy-to-firebase.yml +++ b/.github/workflows/deploy-to-firebase.yml @@ -36,7 +36,9 @@ jobs: cache: pnpm - name: Install dependencies - run: pnpm install --frozen-lockfile --ignore-scripts + # Dependency build scripts are gated by allowBuilds in pnpm-workspace.yaml. + # The git-hosted dicom-microscopy-viewer needs its prepare script to build dist/. + run: pnpm install --frozen-lockfile - name: Build run: REACT_APP_CONFIG=preview PUBLIC_URL=/ pnpm run build diff --git a/.github/workflows/deploy-to-github-pages.yml b/.github/workflows/deploy-to-github-pages.yml index 15faaf03..6b55ba99 100644 --- a/.github/workflows/deploy-to-github-pages.yml +++ b/.github/workflows/deploy-to-github-pages.yml @@ -35,7 +35,9 @@ jobs: cache: pnpm - name: Install dependencies - run: pnpm install --frozen-lockfile --ignore-scripts + # Dependency build scripts are gated by allowBuilds in pnpm-workspace.yaml. + # The git-hosted dicom-microscopy-viewer needs its prepare script to build dist/. + run: pnpm install --frozen-lockfile - name: Build run: pnpm run predeploy diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b9793645..bec9480e 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -32,7 +32,9 @@ jobs: cache: pnpm - name: Install dependencies - run: pnpm install --frozen-lockfile --ignore-scripts + # Dependency build scripts are gated by allowBuilds in pnpm-workspace.yaml. + # The git-hosted dicom-microscopy-viewer needs its prepare script to build dist/. + run: pnpm install --frozen-lockfile - name: Lint run: pnpm run lint diff --git a/README.md b/README.md index 73008e2f..919f3e19 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,8 @@ _Slim_ also supports interactive visualization of image annotations and analysis - [DICOM Segmentation](https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_A.51.html) instances that contain binary or fractional segmentation masks - [DICOM Parametric Map](https://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_A.75.html) instances that contain saliency maps, attention maps, class activation maps, and similar derived images +Fractional segmentations and parametric maps show an in-viewport color legend when at least one overlay is visible. The legend is collapsible and its per-item visibility toggles stay in sync with the switches in the right-hand panel. + | | DICOM IOD | | :-: | :-------- | | IDC CPTAC Segmentation | Segmentation | diff --git a/package.json b/package.json index 52a39784..8a3616b5 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "classnames": "^2.2.6", "dcmjs": "^0.35.0", "detect-browser": "^5.2.1", - "dicom-microscopy-viewer": "^0.48.22", + "dicom-microscopy-viewer": "github:ImagingDataCommons/dicom-microscopy-viewer#03b4732f05fb7d02b6247e2d75e69c73ab5c88ff", "dicomweb-client": "0.10.3", "oidc-client": "^1.11.5", "ol": "^10.7.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 96daaa1b..c621c825 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,8 +46,8 @@ importers: specifier: ^5.2.1 version: 5.3.0 dicom-microscopy-viewer: - specifier: ^0.48.22 - version: 0.48.22 + specifier: github:ImagingDataCommons/dicom-microscopy-viewer#03b4732f05fb7d02b6247e2d75e69c73ab5c88ff + version: https://codeload.github.com/ImagingDataCommons/dicom-microscopy-viewer/tar.gz/03b4732f05fb7d02b6247e2d75e69c73ab5c88ff dicomweb-client: specifier: 0.10.3 version: 0.10.3 @@ -2749,6 +2749,7 @@ packages: crypto-js@4.2.0: resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} + deprecated: Active development of CryptoJS has been discontinued. This library is no longer maintained. crypto-random-string@2.0.0: resolution: {integrity: sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==} @@ -3012,8 +3013,9 @@ packages: engines: {node: '>= 4.2.1'} hasBin: true - dicom-microscopy-viewer@0.48.22: - resolution: {integrity: sha512-IkFwh9lyAjhb6HXbSvZZu0gc462CLGN6h+6iWaZASsnaskRj3Mlrq9QOgzQJ/iYZP/aoaL87UAWn8Q2ZV+sceQ==} + dicom-microscopy-viewer@https://codeload.github.com/ImagingDataCommons/dicom-microscopy-viewer/tar.gz/03b4732f05fb7d02b6247e2d75e69c73ab5c88ff: + resolution: {gitHosted: true, integrity: sha512-zEeCQl3Zaa+MJll3mEXRVUcn2CXI21yrRl0PFpFJaYpKMwZI7q1aZ6W1ZWEDnw6c+RCYYF4mUHp5TbuqcG2fOg==, tarball: https://codeload.github.com/ImagingDataCommons/dicom-microscopy-viewer/tar.gz/03b4732f05fb7d02b6247e2d75e69c73ab5c88ff} + version: 0.48.22 dicomweb-client@0.10.3: resolution: {integrity: sha512-/fHNEAYiz8j+9TNOrNJ0k+hYqirbOT85B7vM7I4VkY8DeDQb4BDUeL3RX6huDVtn6ZQlR91dI+2tejLc5c99wA==} @@ -11052,7 +11054,7 @@ snapshots: transitivePeerDependencies: - supports-color - dicom-microscopy-viewer@0.48.22: + dicom-microscopy-viewer@https://codeload.github.com/ImagingDataCommons/dicom-microscopy-viewer/tar.gz/03b4732f05fb7d02b6247e2d75e69c73ab5c88ff: dependencies: '@cornerstonejs/codec-charls': 1.2.3 '@cornerstonejs/codec-libjpeg-turbo-8bit': 1.2.2 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index cd1888dd..b1b5ae6d 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -4,7 +4,13 @@ strictPeerDependencies: false allowBuilds: core-js: true core-js-pure: true + # Allow the git-hosted dicom-microscopy-viewer to run its prepare script, + # which builds dist/ when installed from a commit tarball. pnpm matches + # git-hosted packages by their exact tarball URL, so this entry must be + # updated whenever the dependency pin in package.json changes. dicom-microscopy-viewer: true + 'dicom-microscopy-viewer@https://codeload.github.com/ImagingDataCommons/dicom-microscopy-viewer/tar.gz/03b4732f05fb7d02b6247e2d75e69c73ab5c88ff': true + overrides: '@types/d3-dispatch': 3.0.6