Skip to content

POC: bring viv-dicomweb-test work into SLIM and add basic bulk annotations support #381

Open
igoroctaviano wants to merge 10 commits intomasterfrom
feat/viv-loader
Open

POC: bring viv-dicomweb-test work into SLIM and add basic bulk annotations support #381
igoroctaviano wants to merge 10 commits intomasterfrom
feat/viv-loader

Conversation

@igoroctaviano
Copy link
Copy Markdown
Collaborator

@igoroctaviano igoroctaviano commented Apr 8, 2026

Summary

POC: bring viv-dicomweb-test work into SLIM and add basic bulk annotations support behind an optional Viv/Deck viewer.

What changed

  • Optional Viv slide viewer path (useViv) alongside the default viewer.
  • Bulk simple annotations (polygons) in that path; fixes/work for alignment, viewport, and cancelling requests when navigating away.
  • Build/config updates and new src/viv/ module (see src/viv/README.md for limits).

Branch & local setup

  • Check out SLIM on feat/viv-loader (this PR branch).
  • This POC expects a linked dicom-microscopy-viewer (DMV) checkout with the matching API changes — not only the npm tarball. From the DMV repo (correct branch for Viv exports): run bun link. From slim/, run bun link dicom-microscopy-viewer, then bun install if needed. See src/viv/README.md for the full note; use bun unlink dicom-microscopy-viewer in SLIM when you want registry packages again.

How to test

  1. Add this to your SLIM config: useViv: true
  2. Add this server URL: https://proxy.imaging.datacommons.cancer.gov/current/viewer-only-no-downloads-see-tinyurl-dot-com-slash-3j3d9jyp/dicomWeb
  3. Open: http://localhost:3000/studies/2.25.106918873973188798943205935727506273925/series/1.3.6.1.4.1.5962.99.1.1088146757.1503397867.1637470719301.2.0
  4. Toggle annotation group visibility. Expect a long first pass while every polygon is built (~23 s in this run); after that, pan/zoom is snappy, memory looks healthy, and interaction feels much better than we had with OpenLayers.

Screenshot 2026-04-07 at 21 39 51

Possible TODO's

  • Faster annotation loads: render or commit geometry incrementally as it’s decoded (instead of one big “wait until everything is ready” pass); move heavy parsing/decoding to web workers where it helps without breaking coordinate math.
  • Clear busy state: loading / progress indicators (and cancel/retry where it makes sense) so long annotation jobs don’t feel like a hang.
  • Lazy / viewport-aware loading: today bulk annotations for matching series load all at once; explore loading by view / LOD so first paint and toggles stay cheap on huge cases.
  • Tighter layering in src/viv/: separate network/DICOMweb, decode (DMV), and Deck.gl layer build so dicomLoader / viewport files don’t keep growing as one mega-module; document the data flow (slide space → deck props) for the next contributor.
  • One source of truth with OpenLayers path: keep behavior and coordinates aligned with SlideViewer / VolumeImageViewer; avoid divergent fetch/decode paths in Slim when DMV already exposes the primitives.
  • Dependency hygiene: move to a published DMV version that includes the Viv-facing exports (instead of bun link / file:), and document which DMV release this tracks.
  • Annotations beyond bulk simple: no TID1500 SR, SEG, optical-path sidebar, or presentation states in Viv yet — decide priority and add incrementally or gate behind flags.
  • Config & docs: ship or link a small example config (viv_example.js mentioned in README) and short operator-facing notes on useViv / vivSettings limits.
  • Automated checks: a couple of smoke tests (build + minimal render path) and, if feasible, a tracked perf budget for “toggle all annotation groups” on a known IDC fixture.
  • Failure modes: nicer errors when WebGL/Deck.gl can’t start, DICOMweb hiccups, or annotation corpora are malformed—without wedging the whole case view.

@deepsource-io
Copy link
Copy Markdown

deepsource-io bot commented Apr 8, 2026

DeepSource Code Review

We reviewed changes in 4e37d65...4fd23eb on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Apr 8, 2026 12:46a.m. Review ↗

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

@igoroctaviano igoroctaviano requested a review from fedorov April 8, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant