2023-03-22 22:45:28 +01:00
|
|
|
import { Types } from '@ohif/core';
|
|
|
|
|
|
2024-12-17 19:49:42 +01:00
|
|
|
import getDataSourcesModule from './getDataSourcesModule';
|
|
|
|
|
import getLayoutTemplateModule from './getLayoutTemplateModule';
|
2022-07-27 18:39:04 +02:00
|
|
|
import getPanelModule from './getPanelModule';
|
2024-12-17 19:49:42 +01:00
|
|
|
import getSopClassHandlerModule from './getSopClassHandlerModule';
|
2022-07-27 18:39:04 +02:00
|
|
|
import getToolbarModule from './getToolbarModule';
|
2023-03-22 22:45:28 +01:00
|
|
|
import getCommandsModule from './commandsModule';
|
2022-09-21 05:40:26 +02:00
|
|
|
import getHangingProtocolModule from './getHangingProtocolModule';
|
2023-05-11 16:01:33 +02:00
|
|
|
import getStudiesForPatientByMRN from './Panels/getStudiesForPatientByMRN';
|
2022-11-24 22:28:10 +01:00
|
|
|
import getCustomizationModule from './getCustomizationModule';
|
2024-04-10 05:57:34 +02:00
|
|
|
import getViewportModule from './getViewportModule';
|
2024-12-17 19:49:42 +01:00
|
|
|
import { id } from './id';
|
2023-03-22 22:45:28 +01:00
|
|
|
import preRegistration from './init';
|
2025-02-28 21:17:55 +01:00
|
|
|
import { createReportDialogPrompt } from './Panels';
|
|
|
|
|
|
2023-09-01 22:19:39 +02:00
|
|
|
import { ContextMenuController, CustomizableContextMenuTypes } from './CustomizableContextMenu';
|
2023-05-29 15:04:49 +02:00
|
|
|
import * as dicomWebUtils from './DicomWebDataSource/utils';
|
2023-09-22 16:23:44 +02:00
|
|
|
import createReportAsync from './Actions/createReportAsync';
|
2024-04-10 16:16:09 +02:00
|
|
|
import StaticWadoClient from './DicomWebDataSource/utils/StaticWadoClient';
|
2024-08-15 20:36:53 +02:00
|
|
|
import { cleanDenaturalizedDataset } from './DicomWebDataSource/utils';
|
2024-11-06 13:15:27 +01:00
|
|
|
import { useViewportsByPositionStore } from './stores/useViewportsByPositionStore';
|
|
|
|
|
import { useViewportGridStore } from './stores/useViewportGridStore';
|
|
|
|
|
import { useUIStateStore } from './stores/useUIStateStore';
|
|
|
|
|
import { useDisplaySetSelectorStore } from './stores/useDisplaySetSelectorStore';
|
|
|
|
|
import { useHangingProtocolStageIndexStore } from './stores/useHangingProtocolStageIndexStore';
|
|
|
|
|
import { useToggleHangingProtocolStore } from './stores/useToggleHangingProtocolStore';
|
|
|
|
|
import { useToggleOneUpViewportGridStore } from './stores/useToggleOneUpViewportGridStore';
|
2025-02-28 21:17:55 +01:00
|
|
|
import { callInputDialogAutoComplete, callInputDialog } from './utils/callInputDialog';
|
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
|
|
|
import { releaseLocalWadouriRegistrations } from './utils/registerNaturalizedDatasetForLocalWadouri';
|
2024-11-06 13:15:27 +01:00
|
|
|
import colorPickerDialog from './utils/colorPickerDialog';
|
|
|
|
|
|
|
|
|
|
import promptSaveReport from './utils/promptSaveReport';
|
|
|
|
|
import promptLabelAnnotation from './utils/promptLabelAnnotation';
|
|
|
|
|
import usePatientInfo from './hooks/usePatientInfo';
|
2024-11-12 19:14:47 +01:00
|
|
|
import { PanelStudyBrowserHeader } from './Panels/StudyBrowser/PanelStudyBrowserHeader';
|
2024-11-12 18:34:14 +01:00
|
|
|
import * as utils from './utils';
|
2025-03-07 04:19:47 +01:00
|
|
|
import { Toolbox } from './utils';
|
2025-01-13 16:49:08 +01:00
|
|
|
import MoreDropdownMenu from './Components/MoreDropdownMenu';
|
|
|
|
|
import requestDisplaySetCreationForStudy from './Panels/requestDisplaySetCreationForStudy';
|
2025-07-03 20:08:46 +02:00
|
|
|
import { Toolbar } from './Toolbar/Toolbar';
|
|
|
|
|
|
2023-03-22 22:45:28 +01:00
|
|
|
const defaultExtension: Types.Extensions.Extension = {
|
2020-05-07 15:34:17 +02:00
|
|
|
/**
|
|
|
|
|
* Only required property. Should be a unique value across all extensions.
|
|
|
|
|
*/
|
2020-05-11 18:56:46 +02:00
|
|
|
id,
|
2023-03-22 22:45:28 +01:00
|
|
|
preRegistration,
|
2024-11-06 13:15:27 +01:00
|
|
|
onModeExit() {
|
|
|
|
|
useViewportGridStore.getState().clearViewportGridState();
|
|
|
|
|
useUIStateStore.getState().clearUIState();
|
|
|
|
|
useDisplaySetSelectorStore.getState().clearDisplaySetSelectorMap();
|
|
|
|
|
useHangingProtocolStageIndexStore.getState().clearHangingProtocolStageIndexMap();
|
|
|
|
|
useToggleHangingProtocolStore.getState().clearToggleHangingProtocol();
|
|
|
|
|
useViewportsByPositionStore.getState().clearViewportsByPosition();
|
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
|
|
|
// Free the Part 10 Blobs (and any parsed copies) retained for locally
|
|
|
|
|
// generated instances (SEG etc.) registered with the wadouri loader.
|
|
|
|
|
releaseLocalWadouriRegistrations();
|
2024-11-06 13:15:27 +01:00
|
|
|
},
|
2020-05-07 15:34:17 +02:00
|
|
|
getDataSourcesModule,
|
2024-04-10 05:57:34 +02:00
|
|
|
getViewportModule,
|
2020-05-09 20:23:43 +02:00
|
|
|
getLayoutTemplateModule,
|
|
|
|
|
getPanelModule,
|
2022-09-21 05:40:26 +02:00
|
|
|
getHangingProtocolModule,
|
2020-05-11 18:56:46 +02:00
|
|
|
getSopClassHandlerModule,
|
2020-05-13 14:22:08 +02:00
|
|
|
getToolbarModule,
|
2023-03-22 22:45:28 +01:00
|
|
|
getCommandsModule,
|
2022-07-27 18:39:04 +02:00
|
|
|
getUtilityModule({ servicesManager }) {
|
|
|
|
|
return [
|
|
|
|
|
{
|
|
|
|
|
name: 'common',
|
|
|
|
|
exports: {
|
2023-05-11 16:01:33 +02:00
|
|
|
getStudiesForPatientByMRN,
|
2022-07-27 18:39:04 +02:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
},
|
2022-11-24 22:28:10 +01:00
|
|
|
|
|
|
|
|
getCustomizationModule,
|
2020-05-07 15:34:17 +02:00
|
|
|
};
|
2022-07-27 18:39:04 +02:00
|
|
|
|
|
|
|
|
export default defaultExtension;
|
2023-03-22 22:45:28 +01:00
|
|
|
|
2023-05-11 16:01:33 +02:00
|
|
|
export {
|
|
|
|
|
ContextMenuController,
|
2023-05-29 15:04:49 +02:00
|
|
|
CustomizableContextMenuTypes,
|
2023-05-11 16:01:33 +02:00
|
|
|
getStudiesForPatientByMRN,
|
2023-05-29 15:04:49 +02:00
|
|
|
dicomWebUtils,
|
2023-09-22 16:23:44 +02:00
|
|
|
createReportAsync,
|
2024-04-10 16:16:09 +02:00
|
|
|
StaticWadoClient,
|
2024-08-15 20:36:53 +02:00
|
|
|
cleanDenaturalizedDataset,
|
2024-11-06 13:15:27 +01:00
|
|
|
// Export all stores
|
|
|
|
|
useDisplaySetSelectorStore,
|
|
|
|
|
useHangingProtocolStageIndexStore,
|
|
|
|
|
useToggleHangingProtocolStore,
|
|
|
|
|
useToggleOneUpViewportGridStore,
|
|
|
|
|
useUIStateStore,
|
|
|
|
|
useViewportGridStore,
|
|
|
|
|
useViewportsByPositionStore,
|
2025-02-28 21:17:55 +01:00
|
|
|
callInputDialogAutoComplete,
|
2024-11-06 13:15:27 +01:00
|
|
|
promptSaveReport,
|
|
|
|
|
promptLabelAnnotation,
|
|
|
|
|
colorPickerDialog,
|
|
|
|
|
usePatientInfo,
|
2024-11-12 19:14:47 +01:00
|
|
|
PanelStudyBrowserHeader,
|
2024-11-12 18:34:14 +01:00
|
|
|
utils,
|
2025-03-07 04:19:47 +01:00
|
|
|
Toolbox,
|
2025-01-13 16:49:08 +01:00
|
|
|
MoreDropdownMenu,
|
|
|
|
|
requestDisplaySetCreationForStudy,
|
2025-02-28 21:17:55 +01:00
|
|
|
callInputDialog,
|
|
|
|
|
createReportDialogPrompt,
|
2025-07-03 20:08:46 +02:00
|
|
|
Toolbar,
|
2023-05-11 16:01:33 +02:00
|
|
|
};
|