ohif-viewer/extensions/default/src
Alireza 70421225d7
fix(pt): resolve Philips PET private SUV bulkdata before scaling (#6096)
* fix(pt): resolve Philips PET private SUV bulkdata before scaling

When a DICOMweb server delivers the Philips PET private tags SUVScaleFactor
(7053,1000) / ActivityConcentrationScaleFactor (7053,1009) as bulkdata, dcmjs
naturalization leaves them as { BulkDataURI } objects. These were fed verbatim
to calculate-suv, which treats the object as a valid value and silently
corrupts the SUV scaling factors.

Resolve these scalar private tags to numbers during ingestion - in both the
lazy (async) and non-lazy (sync) DICOMweb metadata paths, before INSTANCES_ADDED
fires - by decoding the bulkdata (VR-aware: DS/IS text or little-endian FL/FD).
Harden getPTImageIdInstanceMetadata to coerce values to finite numbers (reusing
@ohif/core utils.toNumber) and reject unresolved bulkdata objects so they can
never reach calculate-suv. Share the bulkdata-attach helper between both
metadata paths. Adds unit tests for the bulkdata decoder/resolver and for
getPTImageIdInstanceMetadata.

* refactor(bulkdata): move PET bulkdata resolution to a generic core tag registry

Generalize resolvePETPrivateScalarBulkData into a datasource-agnostic
utils.resolveBulkDataTags in @ohif/core, backed by a static tag registry
seeded with the Philips PET SUV/activity-concentration scalar tags and
extensible via registerResolvedBulkDataTags.

* fix(bulkdata): strip NUL padding and refresh qido auth before resolution

Address review feedback:
- decodeText now strips NUL (0x00) padding, which String.trim() leaves
  intact, so NUL-padded DS/IS values no longer decode as NaN. Adds a
  regression test.
- refresh qidoDicomWebClient.headers before resolveBulkDataTags in both
  series-metadata paths; retrieveBulkData is bound to qidoDicomWebClient,
  matching every other qido op in this file.

* fix(dicomweb): await deferred metadata storage

* fix(dicomweb): support single-part bulkdata responses
2026-07-11 12:16:32 -04:00
..
Actions fix(SR): Added support for spline and live wire SR items. (#5870) 2026-03-17 08:59:47 -04:00
Components fix(colors): Replace hardcoded colors with theme tokens (#6040) 2026-06-29 12:32:40 -04:00
CustomizableContextMenu chore: recovery 2 (#5014) merge to 3.11 (#5175) 2025-07-03 14:08:46 -04:00
customizations fix: Several new worklist issues (#6130) 2026-07-10 08:16:16 -04:00
DataSourceConfigurationAPI feat(typings): Enhance typing support with withAppTypes and custom services throughout OHIF (#4090) 2024-05-08 12:12:49 -04:00
DicomJSONDataSource fix(configuration): Harden dynamic datasource URL trust boundaries and credential handling. (#5963) 2026-04-21 11:55:14 -04:00
DicomLocalDataSource feat: Add support for labelmap seg images in any supported tsuid (also for compressed bitmap) (#5806) 2026-07-09 20:54:23 -04:00
DicomTagBrowser fix(app): appearance modal provider scope, worklist preview persistence, and tag browser label overflow (#6136) 2026-07-10 18:52:06 -04:00
DicomWebDataSource fix(pt): resolve Philips PET private SUV bulkdata before scaling (#6096) 2026-07-11 12:16:32 -04:00
DicomWebProxyDataSource fix(dicom-pdf): enhance PDF loading with authentication support 2026-07-06 09:35:26 -04:00
hangingprotocols chore: update French i18n (#5561) 2025-12-12 10:46:56 -05:00
hooks feat(actions): simplify action corner api through the toolbarService (#5033) 2025-05-15 12:08:12 -04:00
MergeDataSource fix(dicom-pdf): enhance PDF loading with authentication support 2026-07-06 09:35:26 -04:00
Panels feat(WorkList): New Study List (WorkList based on ui-next); old study list renamed to LegacyWorklist (#6005) 2026-05-28 12:26:30 -04:00
SOPClassHandlers fix(viewport): Reset viewport state and fix CINE looping, thumbnail resolution, and dynamic tool settings (#4037) 2024-04-16 11:04:48 -04:00
stores fix(segmentation): Changes to fix problems with non hydrated/loaded segmentations to be viewable when switching hanging protocols (e.g. MPR) (#5139) 2025-06-27 07:11:46 -04:00
Toolbar fix(colors): Replace hardcoded black with background color token (#5815) 2026-02-12 13:12:36 -05:00
types fix(Browser history): fixed NPE when navigating a study via browser history and history navigation is now available via the navigateHistory command (#3337) 2023-04-27 10:46:23 -04:00
utils feat(next): native Generic Viewport migration (useNextViewports) (#6101) 2026-07-11 12:13:54 -04:00
ViewerLayout feat: Add customization URL parameter (#5992) 2026-07-07 15:30:27 -04:00
commandsModule.ts fix: Several new worklist issues (#6130) 2026-07-10 08:16:16 -04:00
findViewportsByPosition.ts OHIF with Cornerstone3D 2.0 (#4347) 2024-11-06 07:15:27 -05:00
getCustomizationModule.tsx feat(ui-next): Adds appearance dialog with theme presets and custom theme support (#6041) 2026-06-29 12:38:46 -04:00
getDataSourcesModule.js fix: Documentation and default enabled for bulkdata load (#4607) 2024-12-17 13:49:42 -05:00
getDisplaySetMessages.ts feat(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode (#3664) 2024-04-09 23:57:34 -04:00
getDisplaySetsFromUnsupportedSeries.js Fix contour annotations RTSS saving (#5545) 2025-11-21 13:07:26 -05:00
getHangingProtocolModule.js fix: bugs after multimonitor (#4680) 2025-01-13 18:32:54 -05:00
getLayoutTemplateModule.js chore(prettier): full repo linting and code reformatting once and for all (#3627) 2023-09-01 16:19:39 -04:00
getPanelModule.tsx OHIF with Cornerstone3D 2.0 (#4347) 2024-11-06 07:15:27 -05:00
getPTImageIdInstanceMetadata.test.ts fix(pt): resolve Philips PET private SUV bulkdata before scaling (#6096) 2026-07-11 12:16:32 -04:00
getPTImageIdInstanceMetadata.ts fix(pt): resolve Philips PET private SUV bulkdata before scaling (#6096) 2026-07-11 12:16:32 -04:00
getSopClassHandlerModule.js fix(MetadataProvider): Correctly assign imageId for multiframe images and remove unused frame information retrieval method (#5965) 2026-07-10 15:35:09 -04:00
getSopClassHandlerModule.test.js fix(MetadataProvider): Correctly assign imageId for multiframe images and remove unused frame information retrieval method (#5965) 2026-07-10 15:35:09 -04:00
getToolbarModule.tsx feature(segmentation): Add contour tools and utilities in a side panel (#5517) 2025-10-29 14:15:52 -04:00
getViewportModule.tsx feat: add support to scoord3d (#5016) 2025-07-31 00:21:26 -04:00
id.js
index.ts feat: Add support for labelmap seg images in any supported tsuid (also for compressed bitmap) (#5806) 2026-07-09 20:54:23 -04:00
init.ts feat(ui-next): Adds appearance dialog with theme presets and custom theme support (#6041) 2026-06-29 12:38:46 -04:00