2024-05-24 18:21:09 +02:00
|
|
|
/** @type {AppTypes.Config} */
|
|
|
|
|
|
feat: Add customization URL parameter (#5992)
* Add customization URL parameter
* fix: Preserve should be customizeable
* Update customizations docs
* fix: Overlay items on patient name
* Add customization test
* Fix resolve to absolute path
* fix: Warn on no data in load
* Remove unused customization stuff
* fix: PR comments
* Update stored parameters to only use an array for mulitples
* Remove requires ohif.* special call out
* Remove strict mode
* PR comments
* Document segmentation examples
* Add three examples as requested
* PR comments
* lock
* Remove old customizatoin export
* fix: Ordering issues on customization loads
* fix: Use correct default for dev builds app config
* Fixes for conflicts
* chore: restore pnpm-lock.yaml to match master
The lockfile diff was incidental peer-descriptor churn and carried no
functional dependency change. It tripped the CircleCI security-audit gate
(which only runs when pnpm-lock.yaml is in the PR diff), surfacing a
pre-existing critical `decompress` transitive vuln that also exists on
master. Restoring master's lockfile removes the audit trigger.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): restore json5 lockfile entry; ignore unfixable decompress GHSA
The previous commit restored pnpm-lock.yaml from master, which dropped the
json5@2.2.3 entry that platform/core legitimately depends on (JSONC parsing
for the customization feature). That broke `--frozen-lockfile` install
(ERR_PNPM_OUTDATED_LOCKFILE). This restores the correct lockfile.
Because the lockfile must change (json5), the CircleCI security-audit gate
runs and previously failed on a critical `decompress` <=4.2.1 zip-slip
advisory. This is a pre-existing transitive vuln (present on master too) with
no published patch — decompress's latest release is 4.2.1, so no version
bump/override can resolve it. It reaches the tree only via @itk-wasm/dam, a
build/data-asset extraction tool under @cornerstonejs/labelmap-interpolation.
Add GHSA-mp2f-45pm-3cg9 to the existing pnpm-workspace.yaml auditConfig
ignoreGhsas accepted-risk list, matching how the repo already exempts other
build-tooling advisories. `pnpm audit --audit-level high` now passes locally
(1 critical ignored, 0 high).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): fix visitStudy URL encoding that broke mpr2 study load
The visitStudy rewrite (added for the ?customization= option) built the URL
with new URLSearchParams({ StudyInstanceUIDs: studyInstanceUID }), which
percent-encodes the value. mpr2.spec.ts embeds an extra param in the UID
string ('<uid>&hangingprotocolid=mpr'), so the & and = were encoded and the
whole thing collapsed into one invalid StudyInstanceUIDs value -> the study
could not be found ('studies are not available'), the viewer never rendered,
and the side-panel-header-right click timed out.
Restore master's raw concatenation for StudyInstanceUIDs (so embedded params
survive as separate query params) while still appending the customization
option separately. Only mpr2 embeds & in the UID, matching the single failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* PR comments
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:30:27 +02:00
|
|
|
// Secure, minimal default configuration.
|
|
|
|
|
//
|
|
|
|
|
// This is what a plain production build with no APP_CONFIG produces, so it is
|
|
|
|
|
// deliberately locked down:
|
|
|
|
|
// - The local file data source (`dicomlocal`) and the runtime `?url=` sources
|
|
|
|
|
// (`dicomjson`, `dicomwebproxy`) are NOT enabled — they widen the attack
|
|
|
|
|
// surface of a default deployment.
|
|
|
|
|
// - `?customization=` URL loading is OFF: no `customizationUrlPrefixes` are
|
|
|
|
|
// configured, so any `?customization=` value is rejected (and aborts boot
|
|
|
|
|
// rather than silently loading).
|
|
|
|
|
// - `dangerouslyUseDynamicConfig` (the `configUrl` query parameter) is off.
|
|
|
|
|
//
|
|
|
|
|
// It does not need to "just work" untouched — point the data source below at
|
|
|
|
|
// your own DICOMweb server. For a fully-featured setup with every data source
|
|
|
|
|
// and customization loading enabled, see config/dev.js (local development) and
|
|
|
|
|
// config/netlify.js (the public demo deploy).
|
2024-06-20 22:58:59 +02:00
|
|
|
window.config = {
|
2025-01-02 20:46:53 +01:00
|
|
|
name: 'config/default.js',
|
2025-03-27 21:47:16 +01:00
|
|
|
routerBasename: null,
|
2023-02-03 16:28:05 +01:00
|
|
|
// whiteLabeling: {},
|
2020-05-12 21:41:11 +02:00
|
|
|
extensions: [],
|
2020-05-07 16:53:13 +02:00
|
|
|
modes: [],
|
2025-03-07 04:19:47 +01:00
|
|
|
customizationService: {},
|
feat: Add customization URL parameter (#5992)
* Add customization URL parameter
* fix: Preserve should be customizeable
* Update customizations docs
* fix: Overlay items on patient name
* Add customization test
* Fix resolve to absolute path
* fix: Warn on no data in load
* Remove unused customization stuff
* fix: PR comments
* Update stored parameters to only use an array for mulitples
* Remove requires ohif.* special call out
* Remove strict mode
* PR comments
* Document segmentation examples
* Add three examples as requested
* PR comments
* lock
* Remove old customizatoin export
* fix: Ordering issues on customization loads
* fix: Use correct default for dev builds app config
* Fixes for conflicts
* chore: restore pnpm-lock.yaml to match master
The lockfile diff was incidental peer-descriptor churn and carried no
functional dependency change. It tripped the CircleCI security-audit gate
(which only runs when pnpm-lock.yaml is in the PR diff), surfacing a
pre-existing critical `decompress` transitive vuln that also exists on
master. Restoring master's lockfile removes the audit trigger.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): restore json5 lockfile entry; ignore unfixable decompress GHSA
The previous commit restored pnpm-lock.yaml from master, which dropped the
json5@2.2.3 entry that platform/core legitimately depends on (JSONC parsing
for the customization feature). That broke `--frozen-lockfile` install
(ERR_PNPM_OUTDATED_LOCKFILE). This restores the correct lockfile.
Because the lockfile must change (json5), the CircleCI security-audit gate
runs and previously failed on a critical `decompress` <=4.2.1 zip-slip
advisory. This is a pre-existing transitive vuln (present on master too) with
no published patch — decompress's latest release is 4.2.1, so no version
bump/override can resolve it. It reaches the tree only via @itk-wasm/dam, a
build/data-asset extraction tool under @cornerstonejs/labelmap-interpolation.
Add GHSA-mp2f-45pm-3cg9 to the existing pnpm-workspace.yaml auditConfig
ignoreGhsas accepted-risk list, matching how the repo already exempts other
build-tooling advisories. `pnpm audit --audit-level high` now passes locally
(1 critical ignored, 0 high).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): fix visitStudy URL encoding that broke mpr2 study load
The visitStudy rewrite (added for the ?customization= option) built the URL
with new URLSearchParams({ StudyInstanceUIDs: studyInstanceUID }), which
percent-encodes the value. mpr2.spec.ts embeds an extra param in the UID
string ('<uid>&hangingprotocolid=mpr'), so the & and = were encoded and the
whole thing collapsed into one invalid StudyInstanceUIDs value -> the study
could not be found ('studies are not available'), the viewer never rendered,
and the side-panel-header-right click timed out.
Restore master's raw concatenation for StudyInstanceUIDs (so embedded params
survive as separate query params) while still appending the customization
option separately. Only mpr2 embeds & in the UID, matching the single failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* PR comments
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:30:27 +02:00
|
|
|
|
|
|
|
|
// --- URL-driven customizations (?customization=) ----------------------------
|
|
|
|
|
// OFF by default. To allow loading customization data files from the URL, set
|
|
|
|
|
// `customizationUrlPrefixes` to a map of allowed prefixes. The `default` prefix
|
|
|
|
|
// (no slashes) is used for values with no leading slash; every other prefix
|
|
|
|
|
// must start AND end with a slash and is matched against the leading
|
|
|
|
|
// `/segment/` of the value. Files are fetched and parsed as JSONC data — they
|
|
|
|
|
// are never executed. Example (left disabled here on purpose):
|
|
|
|
|
//
|
|
|
|
|
// customizationUrlPrefixes: {
|
2026-07-10 18:43:17 +02:00
|
|
|
// default: './customizations/', // ?customization=tools/ctPresets
|
feat: Add customization URL parameter (#5992)
* Add customization URL parameter
* fix: Preserve should be customizeable
* Update customizations docs
* fix: Overlay items on patient name
* Add customization test
* Fix resolve to absolute path
* fix: Warn on no data in load
* Remove unused customization stuff
* fix: PR comments
* Update stored parameters to only use an array for mulitples
* Remove requires ohif.* special call out
* Remove strict mode
* PR comments
* Document segmentation examples
* Add three examples as requested
* PR comments
* lock
* Remove old customizatoin export
* fix: Ordering issues on customization loads
* fix: Use correct default for dev builds app config
* Fixes for conflicts
* chore: restore pnpm-lock.yaml to match master
The lockfile diff was incidental peer-descriptor churn and carried no
functional dependency change. It tripped the CircleCI security-audit gate
(which only runs when pnpm-lock.yaml is in the PR diff), surfacing a
pre-existing critical `decompress` transitive vuln that also exists on
master. Restoring master's lockfile removes the audit trigger.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): restore json5 lockfile entry; ignore unfixable decompress GHSA
The previous commit restored pnpm-lock.yaml from master, which dropped the
json5@2.2.3 entry that platform/core legitimately depends on (JSONC parsing
for the customization feature). That broke `--frozen-lockfile` install
(ERR_PNPM_OUTDATED_LOCKFILE). This restores the correct lockfile.
Because the lockfile must change (json5), the CircleCI security-audit gate
runs and previously failed on a critical `decompress` <=4.2.1 zip-slip
advisory. This is a pre-existing transitive vuln (present on master too) with
no published patch — decompress's latest release is 4.2.1, so no version
bump/override can resolve it. It reaches the tree only via @itk-wasm/dam, a
build/data-asset extraction tool under @cornerstonejs/labelmap-interpolation.
Add GHSA-mp2f-45pm-3cg9 to the existing pnpm-workspace.yaml auditConfig
ignoreGhsas accepted-risk list, matching how the repo already exempts other
build-tooling advisories. `pnpm audit --audit-level high` now passes locally
(1 critical ignored, 0 high).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): fix visitStudy URL encoding that broke mpr2 study load
The visitStudy rewrite (added for the ?customization= option) built the URL
with new URLSearchParams({ StudyInstanceUIDs: studyInstanceUID }), which
percent-encodes the value. mpr2.spec.ts embeds an extra param in the UID
string ('<uid>&hangingprotocolid=mpr'), so the & and = were encoded and the
whole thing collapsed into one invalid StudyInstanceUIDs value -> the study
could not be found ('studies are not available'), the viewer never rendered,
and the side-panel-header-right click timed out.
Restore master's raw concatenation for StudyInstanceUIDs (so embedded params
survive as separate query params) while still appending the customization
option separately. Only mpr2 embeds & in the UID, matching the single failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* PR comments
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:30:27 +02:00
|
|
|
// '/remote/': 'https://cdn.example.com/ohif-custom/', // ?customization=/remote/siteA
|
|
|
|
|
// },
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2019-07-08 21:29:59 +02:00
|
|
|
showStudyList: true,
|
2023-02-03 15:33:28 +01:00
|
|
|
// some windows systems have issues with more than 3 web workers
|
|
|
|
|
maxNumberOfWebWorkers: 3,
|
2022-11-04 14:01:34 +01:00
|
|
|
// below flag is for performance reasons, but it might not work for all servers
|
2023-02-17 21:04:07 +01:00
|
|
|
showWarningMessageForCrossOrigin: true,
|
|
|
|
|
showCPUFallbackMessage: true,
|
2022-11-16 20:19:52 +01:00
|
|
|
showLoadingIndicator: true,
|
2024-06-21 16:04:02 +02:00
|
|
|
experimentalStudyBrowserSort: false,
|
2023-04-01 04:21:16 +02:00
|
|
|
strictZSpacingForVolumeViewport: true,
|
2024-03-19 01:27:12 +01:00
|
|
|
groupEnabledModesFirst: true,
|
2025-04-09 00:34:45 +02:00
|
|
|
allowMultiSelectExport: false,
|
2022-07-27 18:39:04 +02:00
|
|
|
maxNumRequests: {
|
|
|
|
|
interaction: 100,
|
2026-05-28 18:26:30 +02:00
|
|
|
thumbnail: 5,
|
2023-03-29 15:40:22 +02:00
|
|
|
// Prefetch number is dependent on the http protocol. For http 2 or
|
|
|
|
|
// above, the number of requests can be go a lot higher.
|
|
|
|
|
prefetch: 25,
|
2022-07-27 18:39:04 +02:00
|
|
|
},
|
2025-10-17 14:15:13 +02:00
|
|
|
showErrorDetails: 'always', // 'always', 'dev', 'production'
|
feat: Add customization URL parameter (#5992)
* Add customization URL parameter
* fix: Preserve should be customizeable
* Update customizations docs
* fix: Overlay items on patient name
* Add customization test
* Fix resolve to absolute path
* fix: Warn on no data in load
* Remove unused customization stuff
* fix: PR comments
* Update stored parameters to only use an array for mulitples
* Remove requires ohif.* special call out
* Remove strict mode
* PR comments
* Document segmentation examples
* Add three examples as requested
* PR comments
* lock
* Remove old customizatoin export
* fix: Ordering issues on customization loads
* fix: Use correct default for dev builds app config
* Fixes for conflicts
* chore: restore pnpm-lock.yaml to match master
The lockfile diff was incidental peer-descriptor churn and carried no
functional dependency change. It tripped the CircleCI security-audit gate
(which only runs when pnpm-lock.yaml is in the PR diff), surfacing a
pre-existing critical `decompress` transitive vuln that also exists on
master. Restoring master's lockfile removes the audit trigger.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): restore json5 lockfile entry; ignore unfixable decompress GHSA
The previous commit restored pnpm-lock.yaml from master, which dropped the
json5@2.2.3 entry that platform/core legitimately depends on (JSONC parsing
for the customization feature). That broke `--frozen-lockfile` install
(ERR_PNPM_OUTDATED_LOCKFILE). This restores the correct lockfile.
Because the lockfile must change (json5), the CircleCI security-audit gate
runs and previously failed on a critical `decompress` <=4.2.1 zip-slip
advisory. This is a pre-existing transitive vuln (present on master too) with
no published patch — decompress's latest release is 4.2.1, so no version
bump/override can resolve it. It reaches the tree only via @itk-wasm/dam, a
build/data-asset extraction tool under @cornerstonejs/labelmap-interpolation.
Add GHSA-mp2f-45pm-3cg9 to the existing pnpm-workspace.yaml auditConfig
ignoreGhsas accepted-risk list, matching how the repo already exempts other
build-tooling advisories. `pnpm audit --audit-level high` now passes locally
(1 critical ignored, 0 high).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): fix visitStudy URL encoding that broke mpr2 study load
The visitStudy rewrite (added for the ?customization= option) built the URL
with new URLSearchParams({ StudyInstanceUIDs: studyInstanceUID }), which
percent-encodes the value. mpr2.spec.ts embeds an extra param in the UID
string ('<uid>&hangingprotocolid=mpr'), so the & and = were encoded and the
whole thing collapsed into one invalid StudyInstanceUIDs value -> the study
could not be found ('studies are not available'), the viewer never rendered,
and the side-panel-header-right click timed out.
Restore master's raw concatenation for StudyInstanceUIDs (so embedded params
survive as separate query params) while still appending the customization
option separately. Only mpr2 embeds & in the UID, matching the single failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* PR comments
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:30:27 +02:00
|
|
|
// `dangerouslyUseDynamicConfig` (load configuration from a `configUrl` query
|
|
|
|
|
// parameter) is intentionally left OFF in the secure default build. See
|
|
|
|
|
// config/dev.js for the documented shape.
|
2025-08-20 14:13:30 +02:00
|
|
|
defaultDataSourceName: 'ohif',
|
2020-05-07 15:58:02 +02:00
|
|
|
dataSources: [
|
|
|
|
|
{
|
feat: Add customization URL parameter (#5992)
* Add customization URL parameter
* fix: Preserve should be customizeable
* Update customizations docs
* fix: Overlay items on patient name
* Add customization test
* Fix resolve to absolute path
* fix: Warn on no data in load
* Remove unused customization stuff
* fix: PR comments
* Update stored parameters to only use an array for mulitples
* Remove requires ohif.* special call out
* Remove strict mode
* PR comments
* Document segmentation examples
* Add three examples as requested
* PR comments
* lock
* Remove old customizatoin export
* fix: Ordering issues on customization loads
* fix: Use correct default for dev builds app config
* Fixes for conflicts
* chore: restore pnpm-lock.yaml to match master
The lockfile diff was incidental peer-descriptor churn and carried no
functional dependency change. It tripped the CircleCI security-audit gate
(which only runs when pnpm-lock.yaml is in the PR diff), surfacing a
pre-existing critical `decompress` transitive vuln that also exists on
master. Restoring master's lockfile removes the audit trigger.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): restore json5 lockfile entry; ignore unfixable decompress GHSA
The previous commit restored pnpm-lock.yaml from master, which dropped the
json5@2.2.3 entry that platform/core legitimately depends on (JSONC parsing
for the customization feature). That broke `--frozen-lockfile` install
(ERR_PNPM_OUTDATED_LOCKFILE). This restores the correct lockfile.
Because the lockfile must change (json5), the CircleCI security-audit gate
runs and previously failed on a critical `decompress` <=4.2.1 zip-slip
advisory. This is a pre-existing transitive vuln (present on master too) with
no published patch — decompress's latest release is 4.2.1, so no version
bump/override can resolve it. It reaches the tree only via @itk-wasm/dam, a
build/data-asset extraction tool under @cornerstonejs/labelmap-interpolation.
Add GHSA-mp2f-45pm-3cg9 to the existing pnpm-workspace.yaml auditConfig
ignoreGhsas accepted-risk list, matching how the repo already exempts other
build-tooling advisories. `pnpm audit --audit-level high` now passes locally
(1 critical ignored, 0 high).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): fix visitStudy URL encoding that broke mpr2 study load
The visitStudy rewrite (added for the ?customization= option) built the URL
with new URLSearchParams({ StudyInstanceUIDs: studyInstanceUID }), which
percent-encodes the value. mpr2.spec.ts embeds an extra param in the UID
string ('<uid>&hangingprotocolid=mpr'), so the & and = were encoded and the
whole thing collapsed into one invalid StudyInstanceUIDs value -> the study
could not be found ('studies are not available'), the viewer never rendered,
and the side-panel-header-right click timed out.
Restore master's raw concatenation for StudyInstanceUIDs (so embedded params
survive as separate query params) while still appending the customization
option separately. Only mpr2 embeds & in the UID, matching the single failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* PR comments
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:30:27 +02:00
|
|
|
// Read-only public demo server. Replace with your own DICOMweb server.
|
2022-04-06 19:28:42 +02:00
|
|
|
namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
|
2025-08-20 14:13:30 +02:00
|
|
|
sourceName: 'ohif',
|
2020-05-07 15:58:02 +02:00
|
|
|
configuration: {
|
2023-09-21 13:30:01 +02:00
|
|
|
friendlyName: 'AWS S3 Static wado server',
|
2022-11-16 20:19:52 +01:00
|
|
|
name: 'aws',
|
2024-09-19 06:23:28 +02:00
|
|
|
wadoUriRoot: 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb',
|
|
|
|
|
qidoRoot: 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb',
|
|
|
|
|
wadoRoot: 'https://d14fa38qiwhyfd.cloudfront.net/dicomweb',
|
2022-11-16 20:19:52 +01:00
|
|
|
qidoSupportsIncludeField: false,
|
2019-04-29 19:29:37 +02:00
|
|
|
imageRendering: 'wadors',
|
2026-05-28 18:26:30 +02:00
|
|
|
thumbnailRendering: 'thumbnail',
|
|
|
|
|
thumbnailRequestStrategy: 'fetch',
|
2019-10-03 09:51:29 +02:00
|
|
|
enableStudyLazyLoad: true,
|
2025-01-27 17:20:00 +01:00
|
|
|
supportsFuzzyMatching: true,
|
2026-05-28 18:26:30 +02:00
|
|
|
supportsWildcard: true,
|
2022-11-16 20:19:52 +01:00
|
|
|
staticWado: true,
|
feat: Add support for labelmap seg images in any supported tsuid (also for compressed bitmap) (#5806)
* feat: Update to use pnpm (#6031) [simulated squash-merge]
* feat: load DICOM SEG images via imageLoader
* feat: load DICOM SEG images via imageLoader
* PR review fixes
* Test fragment of compressed multiframes
* fix: Removed dependencies incorrectly
* Update frame as a targetted change to avoid stripping remaining params
* lock
* Update test to agree with the missing representation branch
* test(contour): contour color change coverage (#6042)
* test(contour): contour interactions delete segment (#6069)
---------
Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
* chore(version): Update package versions to 3.13.0-beta.98 [skip ci]
* feat(testing): OHIF Test Agent Skills (#5993)
* chore(version): Update package versions to 3.13.0-beta.99 [skip ci]
* test(contour): Add the ContourSegmentToggleLock.spec.ts test file to test contour locking (#6072)
* chore(version): Update package versions to 3.13.0-beta.100 [skip ci]
* chore(testing): Flock lock for playwright tests; Pin node version for OHIF; add more workers (#6099)
* update Cypress apt deps for Ubuntu Noble (drop libgconf-2-4, libasound2→libasound2t64)
* chore(version): Update package versions to 3.13.0-beta.101 [skip ci]
* Debug fixes
* perf(seg): pass explicit frame decode concurrency (16) to SEG loader
Pass an explicit concurrency value (SEG_FRAME_DECODE_CONCURRENCY = 16) into
createFromDicomSegImageId rather than relying on the adapter default, so the
SEG frame fetch/decode parallelism is set at the call site and is ready to
become configurable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(behaviours): add behaviours section + multiframe Part 10 prefetch proposal
Start a "Behaviours" docs section for documenting how the system and UI behave
end-to-end (observed behaviours, design proposals, and failure modes), with an
index README and a Docusaurus category.
First entry is the proposal for loading a multiframe SEG as a single Part 10
instance: prefetch the whole instance (gated by loadMultiframeAsPart10RaceTimeMs),
parse it with dcmjs (handling multipart/related vs raw DICOM), and register the
per-frame compressed pixels into the Cornerstone3D core image cache (the single
uniform frame registry) so the per-frame load path is served locally while the
standard decode path is unchanged. Best-effort: falls back to per-frame fetches
on any failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Pre-cache the image data using a full part10 file for performance
* Add customizations to specify type of segmentation save
* Add clearcache of the cacheData
* Bump @cornerstonejs/* pins 5.1.3 -> 5.4.10 to match libs/@cornerstonejs base
libs/@cornerstonejs (fix/use-imageLoader-for-seg) is based on the released
cs3d 5.4.10 (merge-base with origin/main is the 5.4.10 version bump), so pin
OHIF to that release. The local branch changes still reach the app via the
cs3d:link symlinks; these pins keep the lockfile/npm fallback aligned.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix seg OOM
* fix: file meta garbage element, bogus NumberOfFrames, unguarded source-map-loader
- dicomWriter: drop the naturalized meta.TransferSyntaxUID assignment that
dcmjs wrote as a garbage (0000,0000) element into every saved file's meta
group (download / clipboard / local wadouri blob / local store); keep the
hex 00020010 assignment, which is required for string-form _meta fallbacks.
- registerNaturalizedDatasetForLocalWadouri: keep the computed frame count
local so single-frame IODs (SR, RTSTRUCT) no longer gain a bogus
NumberOfFrames element in their serialized form.
- rsbuild.config: resolve source-map-loader opportunistically (it is not a
project dependency; the rule only serves the gitignored cs3d-link
workflow) so fresh clones no longer crash at config load.
- Regression tests for both writer fixes (mutation-checked).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* PR review comment fixes
* Update versions
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: diattamo <mmddiatta@gmail.com>
Co-authored-by: ohif-bot <danny.ri.brown+ohif-bot@gmail.com>
Co-authored-by: Joe Boccanfuso <109477394+jbocce@users.noreply.github.com>
2026-07-10 02:54:23 +02:00
|
|
|
// Multiframe SEG loads fetch the whole instance as a single Part 10
|
|
|
|
|
// object by default and wait for it: the per-frame endpoint is
|
|
|
|
|
// efficient, but SEG frames are so small and numerous that one bulk
|
|
|
|
|
// fetch beats hundreds of tiny requests. Per-frame loading is the
|
|
|
|
|
// exception — set loadMultiframeAsPart10: false here to force it.
|
2023-05-29 15:04:49 +02:00
|
|
|
singlepart: 'bulkdata,video',
|
|
|
|
|
bulkDataURI: {
|
|
|
|
|
enabled: true,
|
|
|
|
|
relativeResolution: 'studies',
|
2024-08-15 20:36:53 +02:00
|
|
|
transform: url => url.replace('/pixeldata.mp4', '/rendered'),
|
2023-09-21 13:30:01 +02:00
|
|
|
},
|
|
|
|
|
omitQuotationForMultipartRequest: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2024-06-18 04:36:03 +02:00
|
|
|
|
feat: Add customization URL parameter (#5992)
* Add customization URL parameter
* fix: Preserve should be customizeable
* Update customizations docs
* fix: Overlay items on patient name
* Add customization test
* Fix resolve to absolute path
* fix: Warn on no data in load
* Remove unused customization stuff
* fix: PR comments
* Update stored parameters to only use an array for mulitples
* Remove requires ohif.* special call out
* Remove strict mode
* PR comments
* Document segmentation examples
* Add three examples as requested
* PR comments
* lock
* Remove old customizatoin export
* fix: Ordering issues on customization loads
* fix: Use correct default for dev builds app config
* Fixes for conflicts
* chore: restore pnpm-lock.yaml to match master
The lockfile diff was incidental peer-descriptor churn and carried no
functional dependency change. It tripped the CircleCI security-audit gate
(which only runs when pnpm-lock.yaml is in the PR diff), surfacing a
pre-existing critical `decompress` transitive vuln that also exists on
master. Restoring master's lockfile removes the audit trigger.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(ci): restore json5 lockfile entry; ignore unfixable decompress GHSA
The previous commit restored pnpm-lock.yaml from master, which dropped the
json5@2.2.3 entry that platform/core legitimately depends on (JSONC parsing
for the customization feature). That broke `--frozen-lockfile` install
(ERR_PNPM_OUTDATED_LOCKFILE). This restores the correct lockfile.
Because the lockfile must change (json5), the CircleCI security-audit gate
runs and previously failed on a critical `decompress` <=4.2.1 zip-slip
advisory. This is a pre-existing transitive vuln (present on master too) with
no published patch — decompress's latest release is 4.2.1, so no version
bump/override can resolve it. It reaches the tree only via @itk-wasm/dam, a
build/data-asset extraction tool under @cornerstonejs/labelmap-interpolation.
Add GHSA-mp2f-45pm-3cg9 to the existing pnpm-workspace.yaml auditConfig
ignoreGhsas accepted-risk list, matching how the repo already exempts other
build-tooling advisories. `pnpm audit --audit-level high` now passes locally
(1 critical ignored, 0 high).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test(e2e): fix visitStudy URL encoding that broke mpr2 study load
The visitStudy rewrite (added for the ?customization= option) built the URL
with new URLSearchParams({ StudyInstanceUIDs: studyInstanceUID }), which
percent-encodes the value. mpr2.spec.ts embeds an extra param in the UID
string ('<uid>&hangingprotocolid=mpr'), so the & and = were encoded and the
whole thing collapsed into one invalid StudyInstanceUIDs value -> the study
could not be found ('studies are not available'), the viewer never rendered,
and the side-panel-header-right click timed out.
Restore master's raw concatenation for StudyInstanceUIDs (so embedded params
survive as separate query params) while still appending the customization
option separately. Only mpr2 embeds & in the UID, matching the single failure.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* PR comments
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 21:30:27 +02:00
|
|
|
// The following data sources are intentionally NOT enabled in the secure
|
|
|
|
|
// default because they broaden the attack surface of a default deployment.
|
|
|
|
|
// Enable them only in a deployment you control (see config/dev.js):
|
|
|
|
|
// - dicomlocal: loads DICOM files from the user's machine.
|
|
|
|
|
// - dicomjson: loads metadata from an arbitrary `?url=` (gate with
|
|
|
|
|
// `dangerouslyAllowedOriginsForAuthenticatedEnvironments`).
|
|
|
|
|
// - dicomwebproxy: delegating proxy driven by `?url=`.
|
2019-06-09 03:23:00 +02:00
|
|
|
],
|
2021-06-24 18:30:38 +02:00
|
|
|
httpErrorHandler: error => {
|
|
|
|
|
// This is 429 when rejected from the public idc sandbox too often.
|
|
|
|
|
console.warn(error.status);
|
|
|
|
|
|
|
|
|
|
// Could use services manager here to bring up a dialog/modal if needed.
|
|
|
|
|
console.warn('test, navigate to https://ohif.org/');
|
|
|
|
|
},
|
2019-06-02 21:44:01 +02:00
|
|
|
};
|