体数据播放功能修改
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2026-04-16 17:55:33 +08:00
parent e53a18f212
commit b971235164
3 changed files with 44 additions and 10 deletions

View File

@ -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">
@ -185,6 +185,7 @@ export default {
rotateAngle: 0, rotateAngle: 0,
rotateBarLeft: 0, rotateBarLeft: 0,
loading: false, loading: false,
toggleClipPlayTimer: null
} }
}, },
mounted() { mounted() {
@ -491,11 +492,20 @@ export default {
this.playClipState = isPlay this.playClipState = isPlay
const renderingEngine = getRenderingEngine(this.renderingEngineId) const renderingEngine = getRenderingEngine(this.renderingEngineId)
const viewport = renderingEngine.getViewport(this.viewportId) const viewport = renderingEngine.getViewport(this.viewportId)
if (isPlay) { if (isPlay) {
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true }) this.toggleClipPlayTimer = setInterval(() => {
let index = this.series.SliceIndex + 1;
if (index > this.imageInfo.total - 1) index = 0
csUtils.jumpToSlice(viewport.element, { imageIndex: index });
}, framesPerSecond)
// cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true })
} else { } else {
cornerstoneTools.utilities.cine.stopClip(viewport.element) if (this.toggleClipPlayTimer) {
clearInterval(this.toggleClipPlayTimer)
this.toggleClipPlayTimer = null
}
// cornerstoneTools.utilities.cine.stopClip(viewport.element)
} }
}, },
scrollPage(type) { scrollPage(type) {
@ -794,6 +804,12 @@ export default {
return `NS: ${this.$store.state.trials.downloadTip}` return `NS: ${this.$store.state.trials.downloadTip}`
} }
}, },
destroyed() {
if (this.toggleClipPlayTimer) {
clearInterval(this.toggleClipPlayTimer)
this.toggleClipPlayTimer = null
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -2829,7 +2829,9 @@ export default {
const viewport = renderingEngine.getViewport(viewportId) const viewport = renderingEngine.getViewport(viewportId)
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resetOrientationMarkers() this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].resetOrientationMarkers()
let index = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series.SliceIndex let index = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series.SliceIndex
viewport.resetCamera({ resetPan: true, resetZoom: true, resetToCenter: true }) if (this.readingTool !== 3) {
viewport.resetCamera({ resetPan: true, resetZoom: true, resetToCenter: true })
}
viewport.resetProperties() viewport.resetProperties()
if (this.isMPR) { if (this.isMPR) {
let volume = cache.getVolume(this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].volumeId) let volume = cache.getVolume(this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].volumeId)

View File

@ -203,6 +203,7 @@ export default {
rotateAngle: 0, rotateAngle: 0,
rotateBarLeft: 0, rotateBarLeft: 0,
loading: false, loading: false,
toggleClipPlayTimer: null
} }
}, },
mounted() { mounted() {
@ -537,11 +538,20 @@ export default {
this.playClipState = isPlay this.playClipState = isPlay
const renderingEngine = getRenderingEngine(this.renderingEngineId) const renderingEngine = getRenderingEngine(this.renderingEngineId)
const viewport = renderingEngine.getViewport(this.viewportId) const viewport = renderingEngine.getViewport(this.viewportId)
if (isPlay) { if (isPlay) {
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true }) this.toggleClipPlayTimer = setInterval(() => {
let index = this.series.SliceIndex + 1;
if (index > this.imageInfo.total - 1) index = 0
csUtils.jumpToSlice(viewport.element, { imageIndex: index });
}, framesPerSecond)
// cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true })
} else { } else {
cornerstoneTools.utilities.cine.stopClip(viewport.element) if (this.toggleClipPlayTimer) {
clearInterval(this.toggleClipPlayTimer)
this.toggleClipPlayTimer = null
}
// cornerstoneTools.utilities.cine.stopClip(viewport.element)
} }
}, },
scrollPage(type) { scrollPage(type) {
@ -639,7 +649,6 @@ export default {
if (this.series && data.Id === this.series.Id && data.Description === this.series.Description && !isLocate && !data.isLocation) { if (this.series && data.Id === this.series.Id && data.Description === this.series.Description && !isLocate && !data.isLocation) {
data.SliceIndex = this.series.SliceIndex data.SliceIndex = this.series.SliceIndex
} }
console.log(data.SliceIndex, 'data.SliceIndex')
const renderingEngine = getRenderingEngine(this.renderingEngineId) const renderingEngine = getRenderingEngine(this.renderingEngineId)
const viewport = renderingEngine.getViewport(this.viewportId) const viewport = renderingEngine.getViewport(this.viewportId)
if (isLocate) return csUtils.jumpToSlice(viewport.element, { imageIndex: data.SliceIndex }); if (isLocate) return csUtils.jumpToSlice(viewport.element, { imageIndex: data.SliceIndex });
@ -665,6 +674,7 @@ export default {
setTimeout(() => { csUtils.jumpToSlice(viewport.element, { imageIndex: data.SliceIndex }); }) setTimeout(() => { csUtils.jumpToSlice(viewport.element, { imageIndex: data.SliceIndex }); })
} }
}) })
res.volume.dimensionGroupNumber = 2;
viewport.render() viewport.render()
if (this.series.Modality === 'PT' || this.series.Modality === 'NM') { if (this.series.Modality === 'PT' || this.series.Modality === 'NM') {
setTimeout(() => { setTimeout(() => {
@ -851,6 +861,12 @@ export default {
return `NS: ${this.$store.state.trials.downloadTip}` return `NS: ${this.$store.state.trials.downloadTip}`
} }
}, },
destroyed() {
if (this.toggleClipPlayTimer) {
clearInterval(this.toggleClipPlayTimer)
this.toggleClipPlayTimer = null
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>