diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue index 9507761f..01aa2a98 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue @@ -40,10 +40,10 @@
Location: {{ `${Number(imageInfo.location).toFixed(digitPlaces)} mm` - }}
+ }}
Slice Thickness: {{ `${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm` - }}
+ }}
WW/WL: {{ imageInfo.wwwc }}
@@ -614,6 +614,11 @@ export default { } await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, null, this.actionConfiguration) DicomEvent.$emit('SegmentationLoading', this.viewportId) + let volume = cache.getVolume(this.volumeId) + // console.log(volume, 'volume') + if (this.series.orientation === 'AXIAL' && this.series.curIndex) return this.setFullScreen(this.series.curIndex) + let index = this.series.orientation === 'AXIAL' ? Math.ceil((volume._imageIds.length - 1) / 2) - 1 : Math.ceil((volume.dimensions[0]) / 2) - 1 + this.setFullScreen(index) } catch (e) { console.log(e) } 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 e20a5716..4049b07f 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -1678,7 +1678,6 @@ export default { toolGroup.setToolPassive(WindowLevelTool.toolName) toolGroup.setToolPassive(WindowLevelRegionTool.toolName) toolGroup.setToolPassive(PlanarRotateTool.toolName) - if (this.readingTaskState < 2) { toolGroup.setToolPassive(ArrowAnnotateTool.toolName) toolGroup.setToolPassive(RectangleROITool.toolName) @@ -1705,7 +1704,10 @@ export default { toolGroup.setToolEnabled(FixedRadiusCircleROITool.toolName) toolGroup.setToolEnabled(AngleTool.toolName) toolGroup.setToolEnabled(CobbAngleTool.toolName) - if (this.readingTool === 3) toolGroup.setToolEnabled(LabelMapEditWithContourTool.toolName) + if (this.readingTool === 3) { + toolGroup.setToolEnabled(LabelMapEditWithContourTool.toolName) + toolGroup.setToolEnabled(SegmentBidirectionalTool.toolName); + } } toolGroup.setToolPassive(EraserTool.toolName) } @@ -2812,7 +2814,6 @@ export default { const viewport = renderingEngine.getViewport(viewportId) this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resetOrientationMarkers() let index = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series.SliceIndex - console.log(index, 'index') viewport.resetCamera({ resetPan: true, resetZoom: true, resetToCenter: true }) viewport.resetProperties() if (this.isMPR) { @@ -2820,7 +2821,6 @@ export default { const voi = metaData.get('voiLutModule', volume._imageIds[Math.ceil((volume._imageIds.length - 1) / 2)]) const lower = voi.windowCenter[0] - voi.windowWidth[0] / 2 const upper = voi.windowCenter[0] + voi.windowWidth[0] / 2 - 1 - console.log(lower, upper) viewport.setProperties({ voiRange: { upper: upper, lower: lower } }) } if (this.readingTool === 3 && this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series.Modality === 'PT') { @@ -3970,6 +3970,7 @@ export default { if (series.ImageIds.length <= 5) return this.$confirm(this.$t('trials:reading:confirm:smallNumberOfimage'), this.$t('system:menu:confirm:title:warning'), { type: 'warning' }) + series.curIndex = series.SliceIndex DicomEvent.$emit('changeMPR') if (series.ImageIds.length > 500) { let res = await this.getSystemInfo() diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue index 8b0a3b01..994adb93 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/Segmentations.vue @@ -123,7 +123,7 @@ {{ $t('trials:reading:Segmentations:title:InactiveSegmentationsShow') - }} + }}
{{ index + 1 }}
@@ -424,8 +424,11 @@ export default { DicomEvent.$on('changeMPR', () => { if (this.loading) return false // if (viewportId !== `${this.viewportKey}-${this.activeViewportIndex}`) return false - this.segmentationId = this.segmentList[0].segmentationId - this.segmentIndex = this.segmentList[0] ? this.segmentList[0].segments[0].segmentIndex : null + if (this.segmentList && this.segmentList.length > 0) { + this.segmentationId = this.segmentList[0].segmentationId + this.segmentIndex = this.segmentList[0] ? this.segmentList[0].segments[0].segmentIndex : null + } + }) const digitPlaces = Number(localStorage.getItem('digitPlaces')) this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces @@ -771,6 +774,7 @@ export default { // this.selectSegmentGroup() }, async addSegment() { + if (this.saveLoading) return false if (this.segmentList.length <= 0) { let obj = { name: this.getSegmentationName(), diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue index 15c9da59..e5e236cb 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue @@ -383,6 +383,7 @@ export default { }, stackNewImage(e) { const { detail } = e + console.log(detail.imageIndex, 'detail.imageIndex') this.series.SliceIndex = detail.imageIndex this.sliderInfo.height = detail.imageIndex * 100 / detail.numberOfSlices const renderingEngine = getRenderingEngine(this.renderingEngineId) @@ -436,7 +437,6 @@ export default { const viewport = renderingEngine.getViewport( this.viewportId ) - console.log(index, 'setFullScreen') csUtils.jumpToSlice(viewport.element, { imageIndex: index }) viewport.render() }) @@ -638,7 +638,7 @@ export default { if (this.series && data.Id === this.series.Id && data.Description === this.series.Description && !isLocate && !data.isLocation) { data.SliceIndex = this.series.SliceIndex } - // console.log(data) + console.log(data.SliceIndex, 'data.SliceIndex') const renderingEngine = getRenderingEngine(this.renderingEngineId) const viewport = renderingEngine.getViewport(this.viewportId) if (isLocate) return csUtils.jumpToSlice(viewport.element, { imageIndex: data.SliceIndex }); @@ -676,7 +676,8 @@ export default { } await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, data.segment, this.actionConfiguration) DicomEvent.$emit('SegmentationLoading', this.viewportId) - if (this.series.hasOwnProperty('curIndex')) this.setFullScreen(this.series.curIndex) + if (this.series.hasOwnProperty('curIndex')) return this.setFullScreen(this.series.curIndex) + this.setFullScreen(Math.ceil((res.volume._imageIds.length - 1) / 2) - 1) } catch (e) { console.log(e) } diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js b/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js index a51dcd4e..9bea809e 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/helpers/segmentations.js @@ -328,7 +328,6 @@ function viewBidirectional(arr, viewportId) { let item = arr[j] let bidirectional = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex && i.metadata.toolName === "SegmentBidirectional"); // item.bidirectionalView = view - console.log(bidirectional, viewportId, item.view, 'bidirectional') if (!bidirectional) continue let view = item.view if (item.hasOwnProperty('bidirectionalView')) view = item.bidirectionalView @@ -337,7 +336,6 @@ function viewBidirectional(arr, viewportId) { resetViewport(viewportId) } function resetViewport(viewportId) { - console.log('resetViewport') let renderingEngine = getRenderingEngine(renderingEngineId) const viewport = renderingEngine.getViewport(viewportId) viewport.render() @@ -399,8 +397,9 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig, an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === s.SegmentationId && i.metadata.segmentIndex === SegmentJson.bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional"); if (an) { annotation.locking.setAnnotationLocked(an.annotationUID, true) - annotation.visibility.setAnnotationVisibility(an.annotationUID, item.bidirectionalView) + annotation.visibility.setAnnotationVisibility(an.annotationUID, true) } + console.log(an, 'an') } })