Skip to content

Indicator for dicom tag browser#373

Merged
igoroctaviano merged 5 commits intomasterfrom
feat/364
Mar 11, 2026
Merged

Indicator for dicom tag browser#373
igoroctaviano merged 5 commits intomasterfrom
feat/364

Conversation

@igoroctaviano
Copy link
Collaborator

Indicate in the DICOM tag browser which series are shown in the viewport

Screenshot 2026-02-20 at 11 31 10

Closes #364

Description

When multiple slides and derived series (annotations, segmentations, parametric maps, etc.) are available, it was unclear which ones were currently displayed in the viewport. This PR adds visual indicators to the DICOM Tag Browser so users can see at a glance which series are active.

Changes

New files

  • slim/src/services/ActiveSeriesService.ts – Centralized service that tracks which series are currently active in the viewport (active image and visible derived overlays). Exposes setActiveSeries(), getActiveSeriesUIDs(), subscribe(), and clear().

  • slim/src/hooks/useActiveSeries.ts – React hook that subscribes to ActiveSeriesService and returns the set of active series UIDs for use in the DICOM Tag Browser.

Modified files

  • slim/src/components/SlideViewer.tsx – Publishes active series state to ActiveSeriesService whenever visibility changes:

    • Active image: seriesInstanceUID from the current route
    • Active derived: annotation groups, segmentations, parametric maps with visible overlays
    • Publishes on mount, on every update, and clears on unmount
  • slim/src/components/DicomTagBrowser/DicomTagBrowser.tsx – Consumes ActiveSeriesService via useActiveSeries, adds an eye icon (👁) next to each active series in the Series dropdown.

Behavior

  • Active image series: The primary slide/series displayed (from the URL) is marked with the eye icon.
  • Active derived series: Any annotation groups, segmentations, or parametric maps that are currently visible in the viewport are also marked with the eye icon.
  • Icons update in real time when the user toggles visibility in the sidebar (e.g. annotations, segmentations).
  • State is cleared when navigating away from the viewer so indicators do not persist across studies.

Design notes

  • Single source of truth: ActiveSeriesService centralizes all active-series logic.
  • Minimal coupling: components only call setActiveSeries or subscribe; no cross-component wiring.
  • Robust to hierarchy: service is a singleton, so it works regardless of React tree structure (e.g. DICOM Tag Browser in a modal opened from the Header).

@deepsource-io
Copy link

deepsource-io bot commented Feb 20, 2026

DeepSource Code Review

We reviewed changes in 5098d08...c872b60 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 Mar 11, 2026 2:34p.m. Review ↗

@igoroctaviano igoroctaviano merged commit 1952d4e into master Mar 11, 2026
4 checks passed
@sonarqubecloud
Copy link

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.

Indicate in the DICOM tag browser which series is shown in the viewport

1 participant