fix(segmentation): Lock all rehydrated segmentation segments when panelSegmentation.disableEditing is true. (#5503)
* fix(segmentation): Lock all rehydrated segmentation segments when panelSegmentation.disableEditing is true. * PR feedback. * PR feedback. * Added tests for disableEditing and utilities for simulating drag operations. * Update bun.lock file after merging master.
This commit is contained in:
1 parent
3e1d50c8d2
commit
170e860aa1
23 files changed
+625
-242
No files matched your search
@@ -46,8 +46,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.28.2",
|
||||
"@cornerstonejs/adapters": "4.5.5",
|
||||
"@cornerstonejs/core": "4.5.5",
|
||||
"@cornerstonejs/adapters": "4.5.13",
|
||||
"@cornerstonejs/core": "4.5.13",
|
||||
"@kitware/vtk.js": "32.12.0",
|
||||
"react-color": "2.19.3"
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.28.2",
|
||||
"@cornerstonejs/adapters": "4.5.5",
|
||||
"@cornerstonejs/core": "4.5.5",
|
||||
"@cornerstonejs/adapters": "4.5.13",
|
||||
"@cornerstonejs/core": "4.5.13",
|
||||
"@kitware/vtk.js": "32.12.0",
|
||||
"react-color": "2.19.3"
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.28.2",
|
||||
"@cornerstonejs/adapters": "4.5.5",
|
||||
"@cornerstonejs/core": "4.5.5",
|
||||
"@cornerstonejs/tools": "4.5.5",
|
||||
"@cornerstonejs/adapters": "4.5.13",
|
||||
"@cornerstonejs/core": "4.5.13",
|
||||
"@cornerstonejs/tools": "4.5.13",
|
||||
"classnames": "2.5.1"
|
||||
}
|
||||
}
|
||||
@@ -42,8 +42,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.28.2",
|
||||
"@cornerstonejs/core": "4.5.5",
|
||||
"@cornerstonejs/tools": "4.5.5",
|
||||
"@cornerstonejs/core": "4.5.13",
|
||||
"@cornerstonejs/tools": "4.5.13",
|
||||
"classnames": "2.5.1"
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "1.2.4",
|
||||
"@cornerstonejs/codec-openjph": "2.4.7",
|
||||
"@cornerstonejs/dicom-image-loader": "4.5.5",
|
||||
"@cornerstonejs/dicom-image-loader": "4.5.13",
|
||||
"@ohif/core": "3.12.0-beta.67",
|
||||
"@ohif/ui": "3.12.0-beta.67",
|
||||
"dcmjs": "0.43.1",
|
||||
@@ -53,12 +53,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.28.2",
|
||||
"@cornerstonejs/adapters": "4.5.5",
|
||||
"@cornerstonejs/ai": "4.5.5",
|
||||
"@cornerstonejs/core": "4.5.5",
|
||||
"@cornerstonejs/labelmap-interpolation": "4.5.5",
|
||||
"@cornerstonejs/polymorphic-segmentation": "4.5.5",
|
||||
"@cornerstonejs/tools": "4.5.5",
|
||||
"@cornerstonejs/adapters": "4.5.13",
|
||||
"@cornerstonejs/ai": "4.5.13",
|
||||
"@cornerstonejs/core": "4.5.13",
|
||||
"@cornerstonejs/labelmap-interpolation": "4.5.13",
|
||||
"@cornerstonejs/polymorphic-segmentation": "4.5.13",
|
||||
"@cornerstonejs/tools": "4.5.13",
|
||||
"@itk-wasm/morphological-contour-interpolation": "1.1.0",
|
||||
"@kitware/vtk.js": "32.12.0",
|
||||
"html2canvas": "1.4.1",
|
||||
|
||||
@@ -266,10 +266,35 @@ function commandsModule({
|
||||
referencedDisplaySetInstanceUID
|
||||
);
|
||||
storePositionPresentation(referencedDisplaySet);
|
||||
return commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
|
||||
|
||||
const results = commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
|
||||
viewportId,
|
||||
displaySetInstanceUIDs: [referencedDisplaySet.displaySetInstanceUID],
|
||||
});
|
||||
|
||||
const disableEditing = customizationService.getCustomization(
|
||||
'panelSegmentation.disableEditing'
|
||||
);
|
||||
if (disableEditing) {
|
||||
const segmentationRepresentations = segmentationService.getSegmentationRepresentations(
|
||||
viewportId,
|
||||
{
|
||||
segmentationId: displaySet.displaySetInstanceUID,
|
||||
}
|
||||
);
|
||||
|
||||
segmentationRepresentations.forEach(representation => {
|
||||
const segmentIndices = Object.keys(representation.segments);
|
||||
segmentIndices.forEach(segmentIndex => {
|
||||
segmentationService.setSegmentLocked(
|
||||
representation.segmentationId,
|
||||
parseInt(segmentIndex),
|
||||
true
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
return results;
|
||||
} else if (displaySet.Modality === 'SR') {
|
||||
const results = commandsManager.runCommand('hydrateStructuredReport', {
|
||||
displaySetInstanceUID: displaySet.displaySetInstanceUID,
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
"start": "yarn run dev"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@cornerstonejs/core": "4.5.5",
|
||||
"@cornerstonejs/tools": "4.5.5",
|
||||
"@cornerstonejs/core": "4.5.13",
|
||||
"@cornerstonejs/tools": "4.5.13",
|
||||
"@ohif/core": "3.12.0-beta.67",
|
||||
"@ohif/extension-cornerstone-dicom-sr": "3.12.0-beta.67",
|
||||
"@ohif/extension-default": "3.12.0-beta.67",
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.28.2",
|
||||
"@cornerstonejs/core": "4.5.5",
|
||||
"@cornerstonejs/tools": "4.5.5",
|
||||
"@cornerstonejs/core": "4.5.13",
|
||||
"@cornerstonejs/tools": "4.5.13",
|
||||
"@ohif/core": "3.12.0-beta.67",
|
||||
"@ohif/extension-cornerstone": "3.12.0-beta.67",
|
||||
"@ohif/extension-default": "3.12.0-beta.67",
|
||||
|
||||
Reference in new issue
Block a user