Skip to content

Comments

Indicator for dicom tag browser#373

Open
igoroctaviano wants to merge 1 commit intomasterfrom
feat/364
Open

Indicator for dicom tag browser#373
igoroctaviano wants to merge 1 commit 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).

@sonarqubecloud
Copy link

@deepsource-io
Copy link

deepsource-io bot commented Feb 20, 2026

DeepSource Code Review

DeepSource reviewed changes in the commit range 894f63f...699e493 on this pull request. Below is the summary for the review, and you can see the individual issues we found as review comments.

For detailed review results, please see the PR on DeepSource ↗

PR Report Card

Security × 0 issues Overall PR Quality   

Focus Area: Hygiene

Guidance
Mark 'publishActiveSeriesToService' as `readonly` in src/components/SlideViewer.tsx.
Reliability × 0 issues
Complexity × 0 issues
Hygiene × 1 issue

Code Review Summary

Analyzer Status Summary Details
JavaScript 1 new issue detected. Review ↗
How are these analyzer statuses calculated?

Administrators can configure which issue categories are reported and cause analysis to be marked as failed when detected. This helps prevent bad and insecure code from being introduced in the codebase. If you're an administrator, you can modify this in the repository's settings.

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