Compare commits

..

No commits in common. "14ad1ae15685f5d7479cd07824855ff0f757ae71" and "275501db20e11b79bbcdeb42d58edfa1ad6375b7" have entirely different histories.

2 changed files with 87 additions and 85 deletions

View File

@ -68,11 +68,13 @@
<div>{{ instance.InstanceNumber }}</div> <div>{{ instance.InstanceNumber }}</div>
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div> <div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
</div> </div>
</div> </div>
</div> </div>
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" /> <i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
</el-popover> </el-popover>
</div> </div>
</div> </div>
<div v-show="item.instanceCount" style="padding: 1px;"> <div v-show="item.instanceCount" style="padding: 1px;">
{{ item.modality }}: {{ item.instanceCount }} image {{ item.modality }}: {{ item.instanceCount }} image
@ -248,11 +250,8 @@ export default {
for (let j = 0; j < i.NumberOfFrames; j++) { for (let j = 0; j < i.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`) imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
} }
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&seriesIndex=${index}`
} else { } else {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}` imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`)
imageIds.push(imageId)
i.ImageId = imageId
} }
}) })
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
@ -316,19 +315,15 @@ export default {
let isExistMutiFrames = false let isExistMutiFrames = false
const instanceInfoList = [] const instanceInfoList = []
res.Result.forEach(instance => { res.Result.forEach(instance => {
let imageId = ''
if (instance.NumberOfFrames > 1) { if (instance.NumberOfFrames > 1) {
for (let i = 0; i < instance.NumberOfFrames; i++) { for (let i = 0; i < instance.NumberOfFrames; i++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&seriesIndex=0`) imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&seriesIndex=0`)
} }
isExistMutiFrames = true isExistMutiFrames = true
imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=0&instanceId=${instance.Id}&seriesIndex=0`
} else { } else {
const path = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0` imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`)
imageIds.push(path)
imageId = path
} }
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId }) instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path })
}) })
seriesList.push({ seriesList.push({
trialId, trialId,
@ -383,22 +378,13 @@ export default {
} }
if (!isAddToTakPool) { if (!isAddToTakPool) {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
// var images = []
// if (series.isExistMutiFrames) {
// images = series.imageIds.filter(i => i.includes('?frame=0'))
// } else {
// images = series.imageIds
// }
// images.map(imageId => {
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
// })
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
}) })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
@ -445,22 +431,13 @@ export default {
} }
if (!isAddToTakPool) { if (!isAddToTakPool) {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
// if (series.isExistMutiFrames) {
// series.instanceInfoList.map(image => {
// this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
// })
// } else {
// series.imageIds.map((imageId) => {
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
// })
// }
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
}) })
} }
@ -601,22 +578,29 @@ export default {
if (seriesIndex === -1) return if (seriesIndex === -1) return
const series = this.seriesList[seriesIndex] const series = this.seriesList[seriesIndex]
var priority = new Date().getTime() var priority = new Date().getTime()
// var images = [] // for (let i = 0; i < series.imageIds.length; i++) {
// if (series.isExistMutiFrames) { // const imageId = series.imageIds[i]
// images = series.imageIds.filter(i => i.includes('?frame=0')) // if (series.isExistMutiFrames) {
// } else { // const params = this.getInstanceInfo(imageId)
// images = series.imageIds // if (params.frame && params.frame > 0) {
// continue
// }
// }
// var p = null
// if (this.firstInstanceId === imageId) {
// p = priority * 100
// } else {
// p = priority - 1
// }
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
// } // }
// images.map(imageId => {
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
// })
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: image.Path, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
}) })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {

View File

@ -171,7 +171,7 @@
class="viewernavigatorwrapper" class="viewernavigatorwrapper"
style="position: relative;border:1px solid #434343;" style="position: relative;border:1px solid #434343;"
series-type="relation" series-type="relation"
@click="showRelationSeriesImage($event,seriesItem,studyIndex,index)" @click="showRelationSeriesImage($event,seriesItem,index)"
> >
<!-- <el-image <!-- <el-image
class="image-preview" class="image-preview"
@ -347,12 +347,9 @@ export default {
for (let j = 0; j < i.NumberOfFrames; j++) { for (let j = 0; j < i.NumberOfFrames; j++) {
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`) imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
} }
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`
// imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`) // imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`)
} else { } else {
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}` imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
imageIds.push(imageId)
i.ImageId = imageId
// imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`) // imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`)
} }
}) })
@ -397,14 +394,16 @@ export default {
}, },
loadImages(series, seriesIndex) { loadImages(series, seriesIndex) {
console.log('loadImages')
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
console.log(series)
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: image.Path, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
}) })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
@ -435,11 +434,11 @@ export default {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, priority })
}) })
} else { } else {
series.imageIds.map(imageId => { series.imageIds.map(imageId => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, priority })
}) })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
@ -488,11 +487,11 @@ export default {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) { if (series.isExistMutiFrames) {
series.instanceInfoList.map(image => { series.instanceInfoList.map(image => {
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: image.Path, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, priority })
}) })
} else { } else {
series.imageIds.map((imageId) => { series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: studyIndex, seriesIndex: seriesIndex, priority })
}) })
} }
@ -601,6 +600,7 @@ export default {
}, },
// //
async getRelationSeriesByStudy(studyId, index) { async getRelationSeriesByStudy(studyId, index) {
console.log('getRelationSeriesByStudy')
if (this.relationStudyList[index].seriesCount) { if (this.relationStudyList[index].seriesCount) {
this.relationStudyList[index].showSeries = !this.relationStudyList[index].showSeries this.relationStudyList[index].showSeries = !this.relationStudyList[index].showSeries
this.$forceUpdate() this.$forceUpdate()
@ -660,7 +660,7 @@ export default {
} }
} }
}, },
showRelationSeriesImage(e, series, studyIndex, index) { showRelationSeriesImage(e, series, index) {
this.currentRelationIndex = index this.currentRelationIndex = index
const element = e.currentTarget const element = e.currentTarget
const elements = document.querySelectorAll('[series-type]') const elements = document.querySelectorAll('[series-type]')
@ -671,15 +671,9 @@ export default {
this.$refs.dicomViewer.loadImageStack(series) this.$refs.dicomViewer.loadImageStack(series)
if (!series.loadStatus) { if (!series.loadStatus) {
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) { series.imageIds.map(imageId => {
series.instanceInfoList.map(image => { this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) })
})
} else {
series.imageIds.map((imageId) => {
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
})
}
} }
}, },
loadAllImages() { loadAllImages() {
@ -688,14 +682,21 @@ export default {
if (seriesIndex === -1) return if (seriesIndex === -1) return
const series = seriesList[seriesIndex] const series = seriesList[seriesIndex]
var priority = parseInt(new Date().getTime()) var priority = parseInt(new Date().getTime())
if (series.isExistMutiFrames) { for (let i = 0; i < series.imageIds.length; i++) {
series.instanceInfoList.map(image => { const imageId = series.imageIds[i]
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority }) if (series.isExistMutiFrames) {
}) const params = this.getInstanceInfo(imageId)
} else { if (params.frame && params.frame > 0) {
series.imageIds.map((imageId) => { continue
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority }) }
}) }
var p = null
if (this.firstInstanceId === imageId) {
p = priority * 100
} else {
p = priority - 1
}
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
} }
if (this.imageList.length > 0) { if (this.imageList.length > 0) {
this.loopLoad() this.loopLoad()
@ -737,19 +738,24 @@ export default {
for (const [key, value] of searchParams.entries()) { for (const [key, value] of searchParams.entries()) {
params[key] = value params[key] = value
} }
const studyIndex = params.idx.split('|')[0] if (this.visitTaskId === params.visitTaskId) {
const seriesIndex = params.idx.split('|')[1] const studyIndex = params.idx.split('|')[0]
var series = !params.isRelation ? this.studyList[studyIndex].SeriesList[seriesIndex] : null const seriesIndex = params.idx.split('|')[1]
if (!series) return var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
var prefetchInstanceCount = series.prefetchInstanceCount var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
var instanceCount = series.instanceCount if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0 && this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.length < this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
if (series.imageloadedArr.indexOf(imageId) < 0) { const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId) if (i > -1) {
if (i > -1) { prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete
prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete this.currentLoadIns[i].percentComplete = percentComplete
this.currentLoadIns[i].percentComplete = percentComplete if (percentComplete === 100) {
if (percentComplete === 100) { this.currentLoadIns.splice(i, 1)
this.currentLoadIns.splice(i, 1) }
} else {
if (percentComplete !== 100) {
this.currentLoadIns.push({ imageId, percentComplete })
}
prefetchInstanceCount = prefetchInstanceCount + percentComplete
} }
} else { } else {
if (percentComplete !== 100) { if (percentComplete !== 100) {
@ -954,6 +960,18 @@ export default {
border: 1px solid #2c2c2c; border: 1px solid #2c2c2c;
padding: 5px; padding: 5px;
} }
.frame_list{
max-height: 500px;
overflow-y: auto;
}
.instance_frame_wrapper ::-webkit-scrollbar {
width: 7px;
height: 7px;
}
.instance_frame_wrapper ::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #d0d0d0;
}
.frame_content{ .frame_content{
height: 50px; height: 50px;
padding: 5px; padding: 5px;