diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue index a8d4666d..fcd31669 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -584,6 +584,7 @@ import CircleROITool from './tools/CircleROITool' import ScaleOverlayTool from './tools/ScaleOverlayTool' import SegmentBidirectionalTool from './tools/SegmentBidirectionalTool' import FusionJumpToPointTool from './tools/FusionJumpToPointTool' +import MIPJumpToClickTool from './tools/MIPJumpToClickTool' import { setPTClinicalDataForInstance, clearPTClinicalDataCache } from '@/utils/ptClinicalDataCache' import FixedRadiusCircleROITool from './tools/FixedRadiusCircleROITool' import uploadDicomAndNonedicom from '@/components/uploadDicomAndNonedicom' @@ -621,7 +622,6 @@ const { VolumeRotateTool, CrosshairsTool, EllipticalROITool, - MIPJumpToClickTool, synchronizers, LabelMapEditWithContourTool, BrushTool, @@ -1729,6 +1729,7 @@ export default { toolGroup.addTool(VolumeRotateTool.toolName) toolGroup.addTool(MIPJumpToClickTool.toolName, { targetViewportIds: ['viewport-fusion-0', 'viewport-fusion-1', 'viewport-fusion-2', 'viewport-fusion-3', 'viewport-fusion-hidden-sag'], + sourceViewportIds: ['viewport-fusion-3'], }) toolGroup.addTool(FusionJumpToPointTool.toolName, { targetViewportIds: ['viewport-fusion-0', 'viewport-fusion-1', 'viewport-fusion-2', 'viewport-fusion-3', 'viewport-fusion-hidden-sag'], @@ -2521,6 +2522,10 @@ export default { textLines.push(areaLine) } + if (total !== undefined && total !== null && Modality === 'NM') { + textLines.push(`Total: ${this.formatStatSum(total)}`) + } + if (mean) { textLines.push(`Mean: ${this.reRound(mean, this.digitPlaces)} ${modalityUnit}`) } @@ -2533,10 +2538,6 @@ export default { textLines.push(`Std Dev: ${this.reRound(stdDev, this.digitPlaces)} ${modalityUnit}`) } - if (total !== undefined && total !== null && Modality === 'NM') { - textLines.push(`Total: ${this.formatStatSum(total)}`) - } - return textLines }, getEllipticalROIToolTextLines(data, targetId) { diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/tools/MIPJumpToClickTool.js b/src/views/trials/trials-panel/reading/dicoms3D/components/tools/MIPJumpToClickTool.js new file mode 100644 index 00000000..d9b5c609 --- /dev/null +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/tools/MIPJumpToClickTool.js @@ -0,0 +1,34 @@ +import { getEnabledElement } from '@cornerstonejs/core' +import * as cornerstoneTools from '@cornerstonejs/tools' + + +class MIPJumpToClickTool extends cornerstoneTools.MIPJumpToClickTool { + static toolName = 'MIPJumpToClickTool' + + constructor(toolProps = {}, defaultToolProps) { + const mergedDefaultToolProps = defaultToolProps || { + supportedInteractionTypes: ['Mouse', 'Touch'], + configuration: { + targetViewportIds: [], + sourceViewportIds: [], + }, + } + + super(toolProps, mergedDefaultToolProps) + } + + mouseClickCallback(evt) { + const { element, viewportId } = evt.detail || {} + const enabledElement = element ? getEnabledElement(element) : null + const sourceViewportId = viewportId || enabledElement?.viewport?.id || '' + const sourceViewportIds = this.configuration?.sourceViewportIds + const hasSourceLimit = Array.isArray(sourceViewportIds) && sourceViewportIds.length > 0 + if (hasSourceLimit && !sourceViewportIds.includes(sourceViewportId)) { + return + } + + return super.mouseClickCallback(evt) + } +} + +export default MIPJumpToClickTool