直方图修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
774f43a6d0
commit
e53a18f212
|
|
@ -40,10 +40,10 @@
|
||||||
<div v-if="series" class="right-bottom-text">
|
<div v-if="series" class="right-bottom-text">
|
||||||
<div v-show="imageInfo.location">Location: {{
|
<div v-show="imageInfo.location">Location: {{
|
||||||
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
||||||
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orientation-top">
|
<div class="orientation-top">
|
||||||
|
|
@ -280,7 +280,7 @@ export default {
|
||||||
this.element.addEventListener("CORNERSTONE_VOLUME_NEW_IMAGE", this.stackNewImage)
|
this.element.addEventListener("CORNERSTONE_VOLUME_NEW_IMAGE", this.stackNewImage)
|
||||||
this.element.addEventListener('CORNERSTONE_VOI_MODIFIED', this.voiModified)
|
this.element.addEventListener('CORNERSTONE_VOI_MODIFIED', this.voiModified)
|
||||||
this.element.addEventListener('wheel', (e) => {
|
this.element.addEventListener('wheel', (e) => {
|
||||||
if (this.histogramVisible) return false
|
// if (this.histogramVisible) return false
|
||||||
// console.log('CORNERSTONE_STACK_VIEWPORT_SCROLL')
|
// console.log('CORNERSTONE_STACK_VIEWPORT_SCROLL')
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
|
|
@ -383,6 +383,7 @@ export default {
|
||||||
this.imageInfo.sliceThickness = type === this.series.orientation ? spacing[2] : spacing[0]
|
this.imageInfo.sliceThickness = type === this.series.orientation ? spacing[2] : spacing[0]
|
||||||
this.imageInfo.total = detail.numberOfSlices
|
this.imageInfo.total = detail.numberOfSlices
|
||||||
this.getOrientationMarker()
|
this.getOrientationMarker()
|
||||||
|
this.$emit("resetHistogram")
|
||||||
let properties = viewport.getProperties(this.volumeId)
|
let properties = viewport.getProperties(this.volumeId)
|
||||||
if (properties && properties.voiRange) {
|
if (properties && properties.voiRange) {
|
||||||
var { lower, upper } = properties.voiRange
|
var { lower, upper } = properties.voiRange
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@
|
||||||
:curSegSeries.sync="curSegSeries" @activeViewport="activeViewport"
|
:curSegSeries.sync="curSegSeries" @activeViewport="activeViewport"
|
||||||
@toggleTaskByViewport="toggleTaskByViewport" @previewCD="previewCD"
|
@toggleTaskByViewport="toggleTaskByViewport" @previewCD="previewCD"
|
||||||
@renderAnnotations="renderAnnotations" @contentMouseup="contentMouseup"
|
@renderAnnotations="renderAnnotations" @contentMouseup="contentMouseup"
|
||||||
@resetViewport="resetViewport" v-if="readingTool === 3"
|
@resetViewport="resetViewport" @resetHistogram="resetHistogram" v-if="readingTool === 3"
|
||||||
v-resize="(e) => handleSizeChange(e, `viewport-${index}`)" />
|
v-resize="(e) => handleSizeChange(e, `viewport-${index}`)" />
|
||||||
<Viewport :ref="`viewport-${index}`" :data-viewport-uid="`viewport-${index}`"
|
<Viewport :ref="`viewport-${index}`" :data-viewport-uid="`viewport-${index}`"
|
||||||
:rendering-engine-id="renderingEngineId" :viewport-id="`viewport-${index}`" :viewport-index="index"
|
:rendering-engine-id="renderingEngineId" :viewport-id="`viewport-${index}`" :viewport-index="index"
|
||||||
|
|
@ -346,7 +346,7 @@
|
||||||
:MPRInfo="MPRInfo" @activeViewport="activeViewport" @setMPRInfo="setMPRInfo"
|
:MPRInfo="MPRInfo" @activeViewport="activeViewport" @setMPRInfo="setMPRInfo"
|
||||||
@toggleTaskByViewport="toggleTaskByViewport" @previewCD="previewCD"
|
@toggleTaskByViewport="toggleTaskByViewport" @previewCD="previewCD"
|
||||||
@renderAnnotations="renderAnnotations" @contentMouseup="contentMouseup"
|
@renderAnnotations="renderAnnotations" @contentMouseup="contentMouseup"
|
||||||
v-resize="(e) => handleSizeChange(e, `viewport-MPR-${index}`)" />
|
@resetHistogram="resetHistogram" v-resize="(e) => handleSizeChange(e, `viewport-MPR-${index}`)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="readingTool === 2"
|
<div v-if="readingTool === 2"
|
||||||
|
|
@ -917,37 +917,37 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
histogramVisible: {
|
// histogramVisible: {
|
||||||
handler() {
|
// handler() {
|
||||||
if (this.readingTool !== 3) return false
|
// if (this.readingTool !== 3) return false
|
||||||
this.setToolsPassive()
|
// this.setToolsPassive()
|
||||||
let viewportIds = ['viewport-0', 'viewport-1', 'viewport-2', 'viewport-3', this.volumeToolGroupId]
|
// let viewportIds = ['viewport-0', 'viewport-1', 'viewport-2', 'viewport-3', this.volumeToolGroupId]
|
||||||
// if (this.isMPR) {
|
// // if (this.isMPR) {
|
||||||
// viewportIds = [this.volumeToolGroupId]
|
// // viewportIds = [this.volumeToolGroupId]
|
||||||
// }
|
// // }
|
||||||
viewportIds.forEach(id => {
|
// viewportIds.forEach(id => {
|
||||||
const toolGroup = ToolGroupManager.getToolGroup(id)
|
// const toolGroup = ToolGroupManager.getToolGroup(id)
|
||||||
if (this.histogramVisible) {
|
// if (this.histogramVisible) {
|
||||||
toolGroup.setToolEnabled(StackScrollTool.toolName)
|
// toolGroup.setToolEnabled(StackScrollTool.toolName)
|
||||||
} else {
|
// } else {
|
||||||
toolGroup.setToolActive(StackScrollTool.toolName, {
|
// toolGroup.setToolActive(StackScrollTool.toolName, {
|
||||||
bindings: [{ mouseButton: MouseBindings.Wheel }]
|
// bindings: [{ mouseButton: MouseBindings.Wheel }]
|
||||||
})
|
// })
|
||||||
let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.toolName.includes('histogram_'));
|
// let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.toolName.includes('histogram_'));
|
||||||
annotations.forEach(item => {
|
// annotations.forEach(item => {
|
||||||
annotation.state.removeAnnotation(item.annotationUID)
|
// annotation.state.removeAnnotation(item.annotationUID)
|
||||||
})
|
// })
|
||||||
for (let i = 0; i < this.cells.length; i++) {
|
// for (let i = 0; i < this.cells.length; i++) {
|
||||||
const viewportId = `${this.viewportKey}-${i}`
|
// const viewportId = `${this.viewportKey}-${i}`
|
||||||
let renderingEngine = getRenderingEngine(renderingEngineId)
|
// let renderingEngine = getRenderingEngine(renderingEngineId)
|
||||||
const viewport = renderingEngine.getViewport(viewportId)
|
// const viewport = renderingEngine.getViewport(viewportId)
|
||||||
viewport.render()
|
// viewport.render()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.taskInfo = JSON.parse(sessionStorage.getItem('taskInfo'))
|
this.taskInfo = JSON.parse(sessionStorage.getItem('taskInfo'))
|
||||||
|
|
@ -995,6 +995,21 @@ export default {
|
||||||
this.getSystemInfoReading();
|
this.getSystemInfoReading();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
resetHistogram() {
|
||||||
|
if (!this.histogramVisible) return false
|
||||||
|
if (this.timer['histogram']) {
|
||||||
|
clearTimeout(this.timer['histogram'])
|
||||||
|
this.timer['histogram'] = null
|
||||||
|
}
|
||||||
|
this.timer['histogram'] = setTimeout(() => {
|
||||||
|
if (this.$refs.histogram && this.histogramVisible) {
|
||||||
|
this.$refs.histogram.init()
|
||||||
|
}
|
||||||
|
clearTimeout(this.timer['histogram'])
|
||||||
|
this.timer['histogram'] = null
|
||||||
|
}, 500)
|
||||||
|
|
||||||
|
},
|
||||||
showSurface(obj) {
|
showSurface(obj) {
|
||||||
// this.surfaceVisible = true
|
// this.surfaceVisible = true
|
||||||
// this.$refs.contourViewport.setSeriesInfo(obj)
|
// this.$refs.contourViewport.setSeriesInfo(obj)
|
||||||
|
|
@ -1859,10 +1874,10 @@ export default {
|
||||||
|
|
||||||
annotationCompletedListener(e) {
|
annotationCompletedListener(e) {
|
||||||
console.log('Completed')
|
console.log('Completed')
|
||||||
if (this.readingTaskState === 2) return
|
|
||||||
const { annotation } = e.detail
|
const { annotation } = e.detail
|
||||||
if (!annotation) return
|
if (!annotation) return
|
||||||
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
|
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
|
||||||
|
if (this.readingTaskState === 2) return
|
||||||
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
||||||
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
||||||
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
||||||
|
|
@ -1885,11 +1900,11 @@ export default {
|
||||||
},
|
},
|
||||||
annotationModifiedListener(e) {
|
annotationModifiedListener(e) {
|
||||||
console.log('Modified')
|
console.log('Modified')
|
||||||
if (this.readingTaskState === 2) return
|
|
||||||
const { annotation } = e.detail
|
const { annotation } = e.detail
|
||||||
if (!annotation.highlighted) return
|
|
||||||
if (!annotation) return
|
if (!annotation) return
|
||||||
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
|
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
|
||||||
|
if (this.readingTaskState === 2) return
|
||||||
|
if (!annotation.highlighted) return
|
||||||
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
||||||
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
||||||
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
||||||
|
|
@ -1929,10 +1944,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async customAnnotationCompletedListener(e) {
|
async customAnnotationCompletedListener(e) {
|
||||||
if (this.readingTaskState === 2) return
|
|
||||||
const { annotation } = e.detail
|
const { annotation } = e.detail
|
||||||
if (!annotation) return
|
if (!annotation) return
|
||||||
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
|
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
|
||||||
|
if (this.readingTaskState === 2) return
|
||||||
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
||||||
if (i === -1) {
|
if (i === -1) {
|
||||||
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
||||||
|
|
@ -2017,11 +2032,11 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
customAnnotationModifiedListener(e) {
|
customAnnotationModifiedListener(e) {
|
||||||
if (this.readingTaskState === 2) return
|
|
||||||
const { annotation } = e.detail
|
const { annotation } = e.detail
|
||||||
if (!annotation.highlighted) return
|
|
||||||
if (!annotation) return
|
if (!annotation) return
|
||||||
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
|
if (annotation.metadata.toolName.includes('histogram_')) return this.$refs.histogram.initToolValue(annotation)
|
||||||
|
if (this.readingTaskState === 2) return
|
||||||
|
if (!annotation.highlighted) return
|
||||||
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
const i = this.tools.findIndex(i => i.toolName === annotation.metadata.toolName)
|
||||||
if (i === -1) {
|
if (i === -1) {
|
||||||
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
||||||
|
|
@ -2976,13 +2991,13 @@ export default {
|
||||||
},
|
},
|
||||||
// 翻页
|
// 翻页
|
||||||
scrollPage(type) {
|
scrollPage(type) {
|
||||||
if (this.histogramVisible) return false
|
// if (this.histogramVisible) return false
|
||||||
this.clipPlaying = false
|
this.clipPlaying = false
|
||||||
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].scrollPage(type)
|
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].scrollPage(type)
|
||||||
},
|
},
|
||||||
// 播放
|
// 播放
|
||||||
toggleClipPlay(isPlay) {
|
toggleClipPlay(isPlay) {
|
||||||
if (this.histogramVisible) return false
|
// if (this.histogramVisible) return false
|
||||||
this.clipPlaying = !this.clipPlaying
|
this.clipPlaying = !this.clipPlaying
|
||||||
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].toggleClipPlay(isPlay, this.fps)
|
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].toggleClipPlay(isPlay, this.fps)
|
||||||
},
|
},
|
||||||
|
|
@ -4286,6 +4301,7 @@ export default {
|
||||||
Object.keys(this.timer).forEach(key => {
|
Object.keys(this.timer).forEach(key => {
|
||||||
if (this.timer[key]) {
|
if (this.timer[key]) {
|
||||||
clearInterval(this.timer[key])
|
clearInterval(this.timer[key])
|
||||||
|
clearTimeout(this.timer[key])
|
||||||
this.timer[key] = null
|
this.timer[key] = null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@ export default {
|
||||||
this.element.addEventListener('CORNERSTONE_VOI_MODIFIED', this.voiModified)
|
this.element.addEventListener('CORNERSTONE_VOI_MODIFIED', this.voiModified)
|
||||||
this.element.addEventListener('CORNERSTONE_IMAGE_RENDERED', this.imageRendered)
|
this.element.addEventListener('CORNERSTONE_IMAGE_RENDERED', this.imageRendered)
|
||||||
this.element.addEventListener('wheel', (e) => {
|
this.element.addEventListener('wheel', (e) => {
|
||||||
if (this.histogramVisible) return false
|
// if (this.histogramVisible) return false
|
||||||
console.log('CORNERSTONE_STACK_VIEWPORT_SCROLL')
|
console.log('CORNERSTONE_STACK_VIEWPORT_SCROLL')
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
|
|
@ -383,7 +383,7 @@ export default {
|
||||||
},
|
},
|
||||||
stackNewImage(e) {
|
stackNewImage(e) {
|
||||||
const { detail } = e
|
const { detail } = e
|
||||||
console.log(detail.imageIndex, 'detail.imageIndex')
|
|
||||||
this.series.SliceIndex = detail.imageIndex
|
this.series.SliceIndex = detail.imageIndex
|
||||||
this.sliderInfo.height = detail.imageIndex * 100 / detail.numberOfSlices
|
this.sliderInfo.height = detail.imageIndex * 100 / detail.numberOfSlices
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
|
|
@ -411,6 +411,7 @@ export default {
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
this.$emit('renderAnnotations', this.series)
|
this.$emit('renderAnnotations', this.series)
|
||||||
|
this.$emit("resetHistogram")
|
||||||
let properties = viewport.getProperties()
|
let properties = viewport.getProperties()
|
||||||
if (this.isFusion) {
|
if (this.isFusion) {
|
||||||
properties = viewport.getProperties(this.ptVolumeId)
|
properties = viewport.getProperties(this.ptVolumeId)
|
||||||
|
|
|
||||||
|
|
@ -146,14 +146,32 @@ export default {
|
||||||
this.$emit('update:activeTool', toolName)
|
this.$emit('update:activeTool', toolName)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
clearnAnnotation() {
|
||||||
|
let annotations = annotation.state.getAllAnnotations().filter(item => item.metadata.toolName.includes('histogram_'));
|
||||||
|
annotations.forEach(item => {
|
||||||
|
annotation.state.removeAnnotation(item.annotationUID)
|
||||||
|
})
|
||||||
|
let viewportIds = ['viewport-0', 'viewport-1', 'viewport-2', 'viewport-3', 'viewport-MPR-0', 'viewport-MPR-1', 'viewport-MPR-2']
|
||||||
|
for (let i = 0; i < viewportIds.length; i++) {
|
||||||
|
const viewportId = viewportIds[i]
|
||||||
|
let renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
|
const viewport = renderingEngine.getViewport(viewportId)
|
||||||
|
if (!viewport) continue
|
||||||
|
viewport.render()
|
||||||
|
}
|
||||||
|
},
|
||||||
close() {
|
close() {
|
||||||
this.dispose()
|
this.dispose()
|
||||||
this.seriesData = {}
|
this.seriesData = {}
|
||||||
|
this.clearnAnnotation()
|
||||||
this.$emit("update:visible", false)
|
this.$emit("update:visible", false)
|
||||||
},
|
},
|
||||||
async init() {
|
async init() {
|
||||||
|
this.dispose()
|
||||||
|
this.clearnAnnotation()
|
||||||
this.colors = this.defaultColors
|
this.colors = this.defaultColors
|
||||||
let _data = await this.generateData();
|
let _data = await this.generateData();
|
||||||
|
this.seriesData = {}
|
||||||
this.seriesData['default'] = _data.seriesData
|
this.seriesData['default'] = _data.seriesData
|
||||||
this.seriesData['default'].color = this.colors[0]
|
this.seriesData['default'].color = this.colors[0]
|
||||||
this.initChart()
|
this.initChart()
|
||||||
|
|
@ -190,7 +208,6 @@ export default {
|
||||||
Object.keys(this.seriesData).forEach(key => {
|
Object.keys(this.seriesData).forEach(key => {
|
||||||
seriesData.push(this.seriesData[key])
|
seriesData.push(this.seriesData[key])
|
||||||
})
|
})
|
||||||
console.log(seriesData, 'seriesData')
|
|
||||||
const option = {
|
const option = {
|
||||||
useUTC: true,
|
useUTC: true,
|
||||||
title: {
|
title: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue