fix(bugs): Update dependencies and enhance UI components (#4478)

This commit is contained in:
Alireza authored and GitHub committed 2024-11-11 14:28:34 -05:00
1 parent 61e3a9cb52
commit 05d41c5206
34 files changed
+275 -147

No files matched your search

@@ -6,8 +6,6 @@ import { metaData } from '@cornerstonejs/core';
export default function PanelSegmentation({
servicesManager,
commandsManager,
extensionManager,
configuration,
children,
}: withAppTypes) {
const { customizationService, viewportGridService, displaySetService } = servicesManager.services;
@@ -91,23 +89,23 @@ export default function PanelSegmentation({
commandsManager.run('deleteSegmentation', { segmentationId });
},
setFillAlpha: (type, value) => {
setFillAlpha: ({ type }, value) => {
commandsManager.run('setFillAlpha', { type, value });
},
setOutlineWidth: (type, value) => {
setOutlineWidth: ({ type }, value) => {
commandsManager.run('setOutlineWidth', { type, value });
},
setRenderFill: (type, value) => {
setRenderFill: ({ type }, value) => {
commandsManager.run('setRenderFill', { type, value });
},
setRenderOutline: (type, value) => {
setRenderOutline: ({ type }, value) => {
commandsManager.run('setRenderOutline', { type, value });
},
setFillAlphaInactive: (type, value) => {
setFillAlphaInactive: ({ type }, value) => {
commandsManager.run('setFillAlphaInactive', { type, value });
},
@@ -152,6 +150,14 @@ export default function PanelSegmentation({
const exportOptions = segmentationsWithRepresentations.map(({ segmentation }) => {
const { representationData, segmentationId } = segmentation;
const { Labelmap } = representationData;
if (!Labelmap) {
return {
segmentationId,
isExportable: true,
};
}
const referencedImageIds = Labelmap.referencedImageIds;
const firstImageId = referencedImageIds[0];