Compare commits
No commits in common. "6405a07e70d6e119ad0a0b3f5cc87e54f6b1a955" and "eec575d210026f73bb8260fcc20fdf456e8cf986" have entirely different histories.
6405a07e70
...
eec575d210
|
|
@ -187,7 +187,6 @@ export default {
|
||||||
originalMarkers: [],
|
originalMarkers: [],
|
||||||
markers: { top: '', right: '', bottom: '', left: '' },
|
markers: { top: '', right: '', bottom: '', left: '' },
|
||||||
playClipState: false,
|
playClipState: false,
|
||||||
clipFramesPerSecond: null,
|
|
||||||
wwwcIdx: 2,
|
wwwcIdx: 2,
|
||||||
presetName: '',
|
presetName: '',
|
||||||
volumeId: null,
|
volumeId: null,
|
||||||
|
|
@ -626,22 +625,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
syncViewportStaticState() {
|
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
|
||||||
if (!renderingEngine) return
|
|
||||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
|
||||||
if (!viewport) return
|
|
||||||
|
|
||||||
this.getOrientationMarker()
|
|
||||||
const toolGroup =
|
|
||||||
cornerstoneTools.ToolGroupManager.getToolGroupForViewport(
|
|
||||||
this.viewportId,
|
|
||||||
this.renderingEngineId
|
|
||||||
) || cornerstoneTools.ToolGroupManager.getToolGroup(this.viewportId)
|
|
||||||
if (toolGroup) {
|
|
||||||
toolGroup.setToolEnabled('ScaleOverlay')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setFullScreen(index) {
|
setFullScreen(index) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
|
|
@ -744,33 +727,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleClipPlay(isPlay, framesPerSecond) {
|
toggleClipPlay(isPlay, framesPerSecond) {
|
||||||
|
this.playClipState = isPlay
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
if (!renderingEngine) return
|
|
||||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
if (!viewport?.element) return
|
|
||||||
|
|
||||||
const parsedFramesPerSecond = Number(framesPerSecond)
|
|
||||||
const nextFramesPerSecond = Number.isFinite(parsedFramesPerSecond)
|
|
||||||
? parsedFramesPerSecond
|
|
||||||
: (this.clipFramesPerSecond || 15)
|
|
||||||
const isSameSpeedWhilePlaying = this.playClipState &&
|
|
||||||
isPlay &&
|
|
||||||
this.clipFramesPerSecond === nextFramesPerSecond
|
|
||||||
|
|
||||||
if (isPlay) {
|
if (isPlay) {
|
||||||
if (isSameSpeedWhilePlaying) return
|
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true })
|
||||||
|
|
||||||
cornerstoneTools.utilities.cine.playClip(viewport.element, {
|
|
||||||
framesPerSecond: nextFramesPerSecond,
|
|
||||||
loop: true,
|
|
||||||
waitForRendered: 1
|
|
||||||
})
|
|
||||||
this.clipFramesPerSecond = nextFramesPerSecond
|
|
||||||
this.playClipState = true
|
|
||||||
} else {
|
} else {
|
||||||
cornerstoneTools.utilities.cine.stopClip(viewport.element)
|
cornerstoneTools.utilities.cine.stopClip(viewport.element)
|
||||||
this.clipFramesPerSecond = null
|
|
||||||
this.playClipState = false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollPage(type) {
|
scrollPage(type) {
|
||||||
|
|
@ -1161,7 +1125,6 @@ export default {
|
||||||
|
|
||||||
}
|
}
|
||||||
viewport.render()
|
viewport.render()
|
||||||
this.syncViewportStaticState()
|
|
||||||
if (this.currentVoiUpper > 0) {
|
if (this.currentVoiUpper > 0) {
|
||||||
this.voiChange(this.currentVoiUpper)
|
this.voiChange(this.currentVoiUpper)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,7 @@
|
||||||
<svg-icon icon-class="lastframe" class="svg-icon" />
|
<svg-icon icon-class="lastframe" class="svg-icon" />
|
||||||
</div>
|
</div>
|
||||||
<select v-model="fps" :title="$t('trials:dicom-show:speed')" class="select-wrapper"
|
<select v-model="fps" :title="$t('trials:dicom-show:speed')" class="select-wrapper"
|
||||||
@change="handleClipFpsChange">
|
:disabled="clipPlaying">
|
||||||
<!-- 默认值 -->
|
<!-- 默认值 -->
|
||||||
<option :value="5">5</option>
|
<option :value="5">5</option>
|
||||||
<option :value="10">10</option>
|
<option :value="10">10</option>
|
||||||
|
|
@ -3415,15 +3415,6 @@ export default {
|
||||||
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)
|
||||||
},
|
},
|
||||||
handleClipFpsChange() {
|
|
||||||
if (!this.clipPlaying) return
|
|
||||||
|
|
||||||
const activeViewportRef = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`]
|
|
||||||
const activeViewport = activeViewportRef && activeViewportRef[0]
|
|
||||||
if (!activeViewport || typeof activeViewport.toggleClipPlay !== 'function') return
|
|
||||||
|
|
||||||
activeViewport.toggleClipPlay(true, this.fps)
|
|
||||||
},
|
|
||||||
// 获取窗宽窗位模板
|
// 获取窗宽窗位模板
|
||||||
async getWwcTpl() {
|
async getWwcTpl() {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,7 @@
|
||||||
<el-form-item :label="$t('segment:form:label:studyName')" prop="taskBlindName">
|
<el-form-item :label="$t('segment:form:label:studyName')" prop="taskBlindName">
|
||||||
<el-select v-model="form.studyId" clearable @change="(e) => handleChange(e, 'study')"
|
<el-select v-model="form.studyId" clearable @change="(e) => handleChange(e, 'study')"
|
||||||
@clear="(e) => handleClear(e, 'study')">
|
@clear="(e) => handleClear(e, 'study')">
|
||||||
<el-option v-for="item in studyList" :key="item.StudyId"
|
<el-option v-for="item in studyList" :key="item.StudyId" :label="item.StudyCode"
|
||||||
:label="taskInfo.IsReadingTaskViewInOrder !== 0 ? item.StudyCode : `${item.Modalities}(${item.SeriesCount})`"
|
|
||||||
:value="item.StudyId" />
|
:value="item.StudyId" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -88,13 +87,12 @@ export default {
|
||||||
}, trigger: ['blur', 'change']
|
}, trigger: ['blur', 'change']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
taskInfo: {}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
// mounted() {
|
||||||
this.taskInfo = JSON.parse(sessionStorage.getItem('taskInfo'))
|
// this.init()
|
||||||
},
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
setSeries(series) {
|
setSeries(series) {
|
||||||
this.series = series
|
this.series = series
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,6 @@ export default {
|
||||||
originalMarkers: [],
|
originalMarkers: [],
|
||||||
markers: { top: '', right: '', bottom: '', left: '' },
|
markers: { top: '', right: '', bottom: '', left: '' },
|
||||||
playClipState: false,
|
playClipState: false,
|
||||||
clipFramesPerSecond: null,
|
|
||||||
toggleClipPlayTimer: null,
|
|
||||||
wwwcIdx: 2,
|
wwwcIdx: 2,
|
||||||
loading: false,
|
loading: false,
|
||||||
forceFitToWindow: false,
|
forceFitToWindow: false,
|
||||||
|
|
@ -171,10 +169,6 @@ export default {
|
||||||
this.resizeObserver.unobserve(this.element)
|
this.resizeObserver.unobserve(this.element)
|
||||||
this.resizeObserver.disconnect()
|
this.resizeObserver.disconnect()
|
||||||
}
|
}
|
||||||
if (this.toggleClipPlayTimer) {
|
|
||||||
clearInterval(this.toggleClipPlayTimer)
|
|
||||||
this.toggleClipPlayTimer = null
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initViewport() {
|
initViewport() {
|
||||||
|
|
@ -216,11 +210,12 @@ export default {
|
||||||
this.imageInfo.imageOrientationPatient = imagePlaneModule.imageOrientationPatient
|
this.imageInfo.imageOrientationPatient = imagePlaneModule.imageOrientationPatient
|
||||||
this.imageInfo.imagePositionPatient = imagePlaneModule.imagePositionPatient
|
this.imageInfo.imagePositionPatient = imagePlaneModule.imagePositionPatient
|
||||||
this.imageInfo.location = imagePlaneModule.sliceLocation
|
this.imageInfo.location = imagePlaneModule.sliceLocation
|
||||||
|
// this.imageInfo.wwwc = `${Math.round(detail.image.windowWidth)}/${Math.round(detail.image.windowCenter)}`
|
||||||
this.getOrientationMarker()
|
this.getOrientationMarker()
|
||||||
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(this.viewportId)
|
this.$emit('renderAnnotations', this.series)
|
||||||
if (toolGroup) {
|
const toolGroupId = this.viewportId
|
||||||
|
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(toolGroupId)
|
||||||
toolGroup.setToolEnabled('ScaleOverlay')
|
toolGroup.setToolEnabled('ScaleOverlay')
|
||||||
}
|
|
||||||
},
|
},
|
||||||
imageRendered(e) {
|
imageRendered(e) {
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
|
|
@ -317,61 +312,14 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toggleClipPlay(isPlay, framesPerSecond) {
|
toggleClipPlay(isPlay, framesPerSecond) {
|
||||||
|
this.playClipState = isPlay
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
if (!renderingEngine) return
|
|
||||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
if (!viewport?.element) return
|
|
||||||
|
|
||||||
const parsedFramesPerSecond = Number(framesPerSecond)
|
|
||||||
const nextFramesPerSecond = Number.isFinite(parsedFramesPerSecond)
|
|
||||||
? parsedFramesPerSecond
|
|
||||||
: (this.clipFramesPerSecond || 15)
|
|
||||||
const isSameSpeedWhilePlaying = this.playClipState &&
|
|
||||||
isPlay &&
|
|
||||||
this.clipFramesPerSecond === nextFramesPerSecond
|
|
||||||
|
|
||||||
if (isPlay) {
|
if (isPlay) {
|
||||||
if (isSameSpeedWhilePlaying) return
|
cornerstoneTools.utilities.cine.playClip(viewport.element, { framesPerSecond, loop: true })
|
||||||
|
|
||||||
cornerstoneTools.utilities.cine.stopClip(viewport.element)
|
|
||||||
if (this.toggleClipPlayTimer) {
|
|
||||||
clearInterval(this.toggleClipPlayTimer)
|
|
||||||
this.toggleClipPlayTimer = null
|
|
||||||
}
|
|
||||||
|
|
||||||
const frameInterval = Math.max(16, Math.round(1000 / nextFramesPerSecond))
|
|
||||||
this.toggleClipPlayTimer = setInterval(() => {
|
|
||||||
const imageIds = viewport.getImageIds()
|
|
||||||
if (!imageIds?.length) return
|
|
||||||
|
|
||||||
let index = viewport.getCurrentImageIdIndex() + 1
|
|
||||||
if (index > imageIds.length - 1) {
|
|
||||||
index = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
csUtils.jumpToSlice(viewport.element, {
|
|
||||||
imageIndex: index,
|
|
||||||
debounceLoading: false
|
|
||||||
})
|
|
||||||
}, frameInterval)
|
|
||||||
this.clipFramesPerSecond = nextFramesPerSecond
|
|
||||||
this.playClipState = true
|
|
||||||
} else {
|
} else {
|
||||||
cornerstoneTools.utilities.cine.stopClip(viewport.element)
|
cornerstoneTools.utilities.cine.stopClip(viewport.element)
|
||||||
if (this.toggleClipPlayTimer) {
|
|
||||||
clearInterval(this.toggleClipPlayTimer)
|
|
||||||
this.toggleClipPlayTimer = null
|
|
||||||
}
|
|
||||||
this.clipFramesPerSecond = null
|
|
||||||
this.playClipState = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
syncViewportStaticState() {
|
|
||||||
this.getOrientationMarker()
|
|
||||||
this.$emit('renderAnnotations', this.series)
|
|
||||||
const toolGroup = cornerstoneTools.ToolGroupManager.getToolGroup(this.viewportId)
|
|
||||||
if (toolGroup) {
|
|
||||||
toolGroup.setToolEnabled('ScaleOverlay')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrollPage(type) {
|
scrollPage(type) {
|
||||||
|
|
@ -391,13 +339,7 @@ export default {
|
||||||
}
|
}
|
||||||
// viewport.setImageIdIndex(newImageIdIndex)
|
// viewport.setImageIdIndex(newImageIdIndex)
|
||||||
csUtils.jumpToSlice(viewport.element, { imageIndex: newImageIdIndex })
|
csUtils.jumpToSlice(viewport.element, { imageIndex: newImageIdIndex })
|
||||||
if (this.toggleClipPlayTimer) {
|
|
||||||
clearInterval(this.toggleClipPlayTimer)
|
|
||||||
this.toggleClipPlayTimer = null
|
|
||||||
}
|
|
||||||
cornerstoneTools.utilities.cine.stopClip(viewport.element)
|
cornerstoneTools.utilities.cine.stopClip(viewport.element)
|
||||||
this.clipFramesPerSecond = null
|
|
||||||
this.playClipState = false
|
|
||||||
},
|
},
|
||||||
setZoom(ratio) {
|
setZoom(ratio) {
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
|
|
@ -490,7 +432,6 @@ export default {
|
||||||
}
|
}
|
||||||
this.prefetchMetadataInformation(obj.ImageIds, obj.Modality)
|
this.prefetchMetadataInformation(obj.ImageIds, obj.Modality)
|
||||||
await viewport.setStack(this.series.Stack, obj.SliceIndex)
|
await viewport.setStack(this.series.Stack, obj.SliceIndex)
|
||||||
this.syncViewportStaticState()
|
|
||||||
|
|
||||||
viewport.render()
|
viewport.render()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue