fix(SR): When loading DICOM SR, only one measurement is shown with no way to show others (#3228)
* fix: Make the cornerstone sR viewport show all measurements * PR fixes * PR fixes * Add a DICOM SR hanging protocol * Duplicate the hanging protocol for seg as well * PR requested change * PR requested changes * PR fixes plus merge update fixes * PR fixes and integration test fix * PR - documentation
This commit is contained in:
1 parent
dc61d87238
commit
69d8e6a191
24 files changed
+457
-172
No files matched your search
@@ -49,9 +49,9 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^0.6.0",
|
||||
"@cornerstonejs/core": "^0.40.0",
|
||||
"@cornerstonejs/core": "^0.42.2",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "^0.16.0",
|
||||
"@cornerstonejs/tools": "^0.60.1",
|
||||
"@cornerstonejs/tools": "^0.61.11",
|
||||
"@kitware/vtk.js": "26.5.6",
|
||||
"html2canvas": "^1.4.1",
|
||||
"lodash.debounce": "4.0.8",
|
||||
|
||||
@@ -550,6 +550,7 @@ function _checkForCachedJumpToMeasurementEvents(
|
||||
const displaysUIDs = displaySets.map(
|
||||
displaySet => displaySet.displaySetInstanceUID
|
||||
);
|
||||
if (!displaysUIDs?.length) return;
|
||||
|
||||
const measurementIdToJumpTo = measurementService.getJumpToMeasurement(
|
||||
viewportIndex
|
||||
@@ -561,7 +562,7 @@ function _checkForCachedJumpToMeasurementEvents(
|
||||
measurementIdToJumpTo
|
||||
);
|
||||
|
||||
if (displaysUIDs.includes(measurement.displaySetInstanceUID)) {
|
||||
if (displaysUIDs.includes(measurement?.displaySetInstanceUID)) {
|
||||
_jumpToMeasurement(
|
||||
measurement,
|
||||
elementRef,
|
||||
|
||||
@@ -93,7 +93,7 @@ const cornerstoneExtension: Types.Extensions.Extension = {
|
||||
return (
|
||||
<OHIFCornerstoneViewport
|
||||
{...props}
|
||||
ToolbarService={toolbarService}
|
||||
toolbarService={toolbarService}
|
||||
servicesManager={servicesManager}
|
||||
commandsManager={commandsManager}
|
||||
/>
|
||||
|
||||
+14
-6
@@ -1,5 +1,10 @@
|
||||
import { ServicesManager, Types } from '@ohif/core';
|
||||
import { cache as cs3DCache, Enums, volumeLoader } from '@cornerstonejs/core';
|
||||
import {
|
||||
cache as cs3DCache,
|
||||
Enums,
|
||||
volumeLoader,
|
||||
utilities as utils,
|
||||
} from '@cornerstonejs/core';
|
||||
|
||||
import getCornerstoneViewportType from '../../utils/getCornerstoneViewportType';
|
||||
import {
|
||||
@@ -11,14 +16,14 @@ const VOLUME_LOADER_SCHEME = 'cornerstoneStreamingImageVolume';
|
||||
|
||||
class CornerstoneCacheService {
|
||||
static REGISTRATION = {
|
||||
name: 'cornerstoneCacheService',
|
||||
altName: 'CornerstoneCacheService',
|
||||
name: 'cornerstoneCacheService',
|
||||
altName: 'CornerstoneCacheService',
|
||||
create: ({
|
||||
servicesManager,
|
||||
}: Types.Extensions.ExtensionParams): CornerstoneCacheService => {
|
||||
return new CornerstoneCacheService(servicesManager);
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
stackImageIds: Map<string, string[]> = new Map();
|
||||
volumeImageIds: Map<string, string[]> = new Map();
|
||||
@@ -91,7 +96,10 @@ class CornerstoneCacheService {
|
||||
displaySetService
|
||||
) {
|
||||
if (viewportData.viewportType === Enums.ViewportType.STACK) {
|
||||
throw new Error('Invalidation of StackViewport is not supported yet');
|
||||
return this._getCornerstoneStackImageIds(
|
||||
displaySetService.getDisplaySetByUID(invalidatedDisplaySetInstanceUID),
|
||||
dataSource
|
||||
);
|
||||
}
|
||||
|
||||
// Todo: grab the volume and get the id from the viewport itself
|
||||
|
||||
@@ -203,6 +203,10 @@ class ViewportInfo {
|
||||
orientation = getCornerstoneOrientation(viewportOptionsEntry.orientation);
|
||||
}
|
||||
|
||||
if (!toolGroupId) {
|
||||
toolGroupId = DEFAULT_TOOLGROUP_ID;
|
||||
}
|
||||
|
||||
this.setViewportOptions({
|
||||
...viewportOptionsEntry,
|
||||
viewportId: this.viewportId,
|
||||
@@ -228,7 +232,8 @@ class ViewportInfo {
|
||||
}
|
||||
|
||||
public getSyncGroups(): SyncGroup[] {
|
||||
return this.viewportOptions.syncGroups || [];
|
||||
this.viewportOptions.syncGroups ||= [];
|
||||
return this.viewportOptions.syncGroups;
|
||||
}
|
||||
|
||||
public getDisplaySetOptions(): Array<DisplaySetOptions> {
|
||||
|
||||
Reference in new issue
Block a user