多帧对齐更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d6a3bcba30
commit
2784958ccb
|
@ -190,14 +190,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 适应图像或窗口 -->
|
<!-- 适应图像或窗口 -->
|
||||||
<!-- <div
|
<div
|
||||||
class="tool-item"
|
class="tool-item"
|
||||||
:title="forceFitToWindow ? `${$t('trials:reading:button:fitWindow')}` : `${$t('trials:reading:button:fitImage')}`"
|
:title="forceFitToWindow ? `${$t('trials:reading:button:fitWindow')}` : `${$t('trials:reading:button:fitImage')}`"
|
||||||
@click.prevent="fitToType(forceFitToWindow)"
|
@click.prevent="fitToType(forceFitToWindow)"
|
||||||
>
|
>
|
||||||
<svg-icon v-if="forceFitToWindow" icon-class="fitToWindow" class="svg-icon" />
|
<svg-icon v-if="forceFitToWindow" icon-class="fitToWindow" class="svg-icon" />
|
||||||
<svg-icon v-else icon-class="fitToImage" class="svg-icon" />
|
<svg-icon v-else icon-class="fitToImage" class="svg-icon" />
|
||||||
</div> -->
|
</div>
|
||||||
<div
|
<div
|
||||||
v-for="tool in tools"
|
v-for="tool in tools"
|
||||||
:key="tool.toolName"
|
:key="tool.toolName"
|
||||||
|
@ -568,7 +568,7 @@ export default {
|
||||||
fps: 15,
|
fps: 15,
|
||||||
manualsDialog: { visible: false, isFullscreen: false },
|
manualsDialog: { visible: false, isFullscreen: false },
|
||||||
hotKeyList: [],
|
hotKeyList: [],
|
||||||
forceFitToWindow: true,
|
forceFitToWindow: false,
|
||||||
isShowAnnotations: true,
|
isShowAnnotations: true,
|
||||||
clinicalDataVisible: false,
|
clinicalDataVisible: false,
|
||||||
isClinicalDataFullscreen: false,
|
isClinicalDataFullscreen: false,
|
||||||
|
@ -780,11 +780,11 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
// 多帧
|
// 多帧
|
||||||
for (let i = 0; i < nFrames; i++) {
|
for (let i = 0; i < nFrames; i++) {
|
||||||
const newImageId = `wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}&frame=${i + 1}`
|
const newImageId = `wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}&frame=${i + 1}`
|
||||||
stack.push(newImageId)
|
stack.push(newImageId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
imageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${taskId}`)
|
imageIds.push(`wadouri:${this.OSSclientConfig.basePath}${instance.Path}?visitTaskId=${taskId}&instanceId=${instance.Id}`)
|
||||||
this.instanceInfo[instance.Id] = { taskIndex, studyIndex, seriesIndex }
|
this.instanceInfo[instance.Id] = { taskIndex, studyIndex, seriesIndex }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1154,6 +1154,8 @@ export default {
|
||||||
console.log('Modified')
|
console.log('Modified')
|
||||||
if (this.readingTaskState === 2) return
|
if (this.readingTaskState === 2) return
|
||||||
const { annotation } = e.detail
|
const { annotation } = e.detail
|
||||||
|
console.log(annotation.highlighted)
|
||||||
|
if (!annotation.highlighted) return
|
||||||
if (!annotation) return
|
if (!annotation) 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[`viewport-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`viewport-${this.activeViewportIndex}`][0].series
|
||||||
|
@ -1744,8 +1746,9 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
fitToType(forceFitToWindow) {
|
fitToType(forceFitToWindow) {
|
||||||
this.$refs[`viewport-${this.activeViewportIndex}`][0].resize(forceFitToWindow)
|
|
||||||
this.forceFitToWindow = !forceFitToWindow
|
this.forceFitToWindow = !forceFitToWindow
|
||||||
|
this.$refs[`viewport-${this.activeViewportIndex}`][0].resize(forceFitToWindow)
|
||||||
|
|
||||||
},
|
},
|
||||||
// 切换全屏
|
// 切换全屏
|
||||||
toggleFullScreen(e, index) {
|
toggleFullScreen(e, index) {
|
||||||
|
@ -1862,7 +1865,7 @@ export default {
|
||||||
if (baselineSeries.IsMarked) {
|
if (baselineSeries.IsMarked) {
|
||||||
const i = annotations.findIndex(i => Object.keys(i.MeasureData).length > 0 && i.OrderMarkName === baselineSeries.MeasureData.OrderMarkName)
|
const i = annotations.findIndex(i => Object.keys(i.MeasureData).length > 0 && i.OrderMarkName === baselineSeries.MeasureData.OrderMarkName)
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
obj = this.getMarkedSeries(studyList, annotations[i])
|
obj = this.getMarkedSeries(studyList, annotations[i].MeasureData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Object.keys(obj).length === 0) {
|
if (Object.keys(obj).length === 0) {
|
||||||
|
@ -1906,7 +1909,7 @@ export default {
|
||||||
const i = annotations.findIndex(a => Object.keys(a.MeasureData).length > 0)
|
const i = annotations.findIndex(a => Object.keys(a.MeasureData).length > 0)
|
||||||
if (i > -1) {
|
if (i > -1) {
|
||||||
// 有标记时,显示带标记影像所在序列
|
// 有标记时,显示带标记影像所在序列
|
||||||
obj = this.getMarkedSeries(studyList, annotations[i])
|
obj = this.getMarkedSeries(studyList, annotations[i].MeasureData)
|
||||||
} else {
|
} else {
|
||||||
for (let k = 0; k < studyList.length; k++) {
|
for (let k = 0; k < studyList.length; k++) {
|
||||||
const seriesIdx = studyList[k].SeriesList.findIndex(s => s.SliceThickness && parseInt(s.SliceThickness) === 5)
|
const seriesIdx = studyList[k].SeriesList.findIndex(s => s.SliceThickness && parseInt(s.SliceThickness) === 5)
|
||||||
|
@ -1935,21 +1938,21 @@ export default {
|
||||||
},
|
},
|
||||||
getMarkedSeries(studyList, annotation) {
|
getMarkedSeries(studyList, annotation) {
|
||||||
let obj = {}
|
let obj = {}
|
||||||
const sIdx = studyList.findIndex(s => s.StudyId === annotation.StudyId)
|
const sIdx = studyList.findIndex(s => s.StudyId === annotation.studyId)
|
||||||
if (sIdx > -1) {
|
if (sIdx > -1) {
|
||||||
const seriesList = studyList[sIdx].SeriesList
|
const seriesList = studyList[sIdx].SeriesList
|
||||||
const seriesIdx = seriesList.findIndex(s => s.Id === annotation.SeriesId)
|
const seriesIdx = seriesList.findIndex(s => s.Id === annotation.seriesId)
|
||||||
if (seriesIdx > -1) {
|
if (seriesIdx > -1) {
|
||||||
const instanceIdx = seriesList[seriesIdx].InstanceInfoList.findIndex(i => i.Id === annotation.InstanceId)
|
const instanceIdx = seriesList[seriesIdx].InstanceInfoList.findIndex(i => i.Id === annotation.instanceId)
|
||||||
let filterStr = ''
|
let filterStr = ''
|
||||||
if (instanceIdx > -1 && seriesList[seriesIdx].IsExistMutiFrames) {
|
if (instanceIdx > -1 && seriesList[seriesIdx].IsExistMutiFrames) {
|
||||||
if (seriesList[seriesIdx].InstanceInfoList[instanceIdx].NumberOfFrames > 0) {
|
if (seriesList[seriesIdx].InstanceInfoList[instanceIdx].NumberOfFrames > 0) {
|
||||||
filterStr = `frame=${annotation.MeasureData.frame}&instanceId=${annotation.InstanceId}`
|
filterStr = `instanceId=${annotation.instanceId}&frame=${annotation.numberOfFrames}`
|
||||||
} else {
|
} else {
|
||||||
filterStr = `instanceId=${annotation.InstanceId}`
|
filterStr = `instanceId=${annotation.instanceId}`
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
filterStr = `instanceId=${annotation.InstanceId}`
|
filterStr = `instanceId=${annotation.instanceId}`
|
||||||
}
|
}
|
||||||
const stack = seriesList[seriesIdx].Stack
|
const stack = seriesList[seriesIdx].Stack
|
||||||
const imageIdIdx = stack.findIndex(is => is.includes(filterStr))
|
const imageIdIdx = stack.findIndex(is => is.includes(filterStr))
|
||||||
|
@ -2027,7 +2030,7 @@ export default {
|
||||||
}
|
}
|
||||||
const annotationIdx = this.visitTaskList[taskIdx].Annotations.findIndex(i => i.OrderMarkName === obj.lesionName)
|
const annotationIdx = this.visitTaskList[taskIdx].Annotations.findIndex(i => i.OrderMarkName === obj.lesionName)
|
||||||
if (annotationIdx > -1) {
|
if (annotationIdx > -1) {
|
||||||
firstAddSeries = this.getMarkedSeries(this.visitTaskList[taskIdx].StudyList, this.visitTaskList[taskIdx].Annotations[annotationIdx])
|
firstAddSeries = this.getMarkedSeries(this.visitTaskList[taskIdx].StudyList, this.visitTaskList[taskIdx].Annotations[annotationIdx].MeasureData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (obj.isMarked) {
|
if (obj.isMarked) {
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="series.IsDicom && series.LoadedImageProgress>0 && series.LoadedImageProgress<series.InstanceCount * 100" style="width: 100%;">
|
<div v-if="series.LoadedImageCount > 0 && series.LoadedImageCount < series.InstanceCount" style="width: 100%;">
|
||||||
<el-progress
|
<el-progress
|
||||||
:percentage="parseInt((series.LoadedImageProgress / series.InstanceCount).toFixed(2))"
|
:percentage="parseInt((series.LoadedImageProgress / series.InstanceCount).toFixed(2))"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -329,7 +329,15 @@ export default {
|
||||||
resize(forceFitToWindow) {
|
resize(forceFitToWindow) {
|
||||||
console.log('resize: ', forceFitToWindow)
|
console.log('resize: ', forceFitToWindow)
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
renderingEngine.resize(true, forceFitToWindow)
|
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
|
if (!forceFitToWindow) {
|
||||||
|
viewport.setZoom(0.5)
|
||||||
|
viewport.render()
|
||||||
|
} else {
|
||||||
|
viewport.setZoom(1)
|
||||||
|
viewport.render()
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async prefetchMetadataInformation(imageIdsToPrefetch) {
|
async prefetchMetadataInformation(imageIdsToPrefetch) {
|
||||||
let taskPromises = []
|
let taskPromises = []
|
||||||
|
@ -346,10 +354,11 @@ export default {
|
||||||
if (this.series && obj.Id === this.series.Id && obj.Description === this.series.Description && !isLocate) {
|
if (this.series && obj.Id === this.series.Id && obj.Description === this.series.Description && !isLocate) {
|
||||||
obj.SliceIndex = this.series.SliceIndex
|
obj.SliceIndex = this.series.SliceIndex
|
||||||
}
|
}
|
||||||
|
if (isLocate && obj.SliceIndex === this.series.SliceIndex) return
|
||||||
this.series = { ...obj }
|
this.series = { ...obj }
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||||
await this.prefetchMetadataInformation(obj.ImageIds)
|
this.prefetchMetadataInformation(obj.ImageIds)
|
||||||
await viewport.setStack(this.series.Stack, obj.SliceIndex)
|
await viewport.setStack(this.series.Stack, obj.SliceIndex)
|
||||||
// cornerstoneTools.utilities.stackContextPrefetch.enable(viewport.element)
|
// cornerstoneTools.utilities.stackContextPrefetch.enable(viewport.element)
|
||||||
viewport.render()
|
viewport.render()
|
||||||
|
|
Loading…
Reference in New Issue