影像匿名多帧优化
parent
753127381f
commit
64ef1e513c
|
|
@ -387,8 +387,13 @@ export default {
|
|||
e.detail.enabledElement.options = {}
|
||||
var data = e.detail.image.data
|
||||
this.dicomInfo.hospital = data.string('x00080080')
|
||||
let instanceInfo = this.series.instanceInfoList.find(item => item.ImageId === e.detail.image.imageId)
|
||||
this.dicomInfo.IsMasked = instanceInfo.IsMasked
|
||||
// let instanceInfo = this.series.instanceInfoList.find(item => item.ImageId === e.detail.image.imageId)
|
||||
let instanceInfo = this.series.instanceInfoList.find(item => {
|
||||
let s1 = item.ImageId.split("?")[0]
|
||||
let s2 = e.detail.image.imageId.split("?")[0]
|
||||
return s1 === s2
|
||||
})
|
||||
this.dicomInfo.IsMasked = instanceInfo ? instanceInfo.IsMasked : false
|
||||
// this.dicomInfo.pid = data.string('x00100020')
|
||||
this.dicomInfo.pid = data.string('x00120040')
|
||||
this.dicomInfo.name = data.string('x00100010')
|
||||
|
|
|
|||
|
|
@ -515,7 +515,11 @@ export default {
|
|||
if (f) {
|
||||
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(obj => {
|
||||
let { image } = obj
|
||||
let instanceInfo = this.series.instanceInfoList.find(item => item.ImageId === image.imageId)
|
||||
let instanceInfo = this.series.instanceInfoList.find(item => {
|
||||
let s1 = item.ImageId.split("?")[0]
|
||||
let s2 = image.imageId.split("?")[0]
|
||||
return s1 === s2
|
||||
})
|
||||
if (!instanceInfo.IsMasked) return this.$confirm(this.$t("DicomViewer:anonymous:notMasked"))
|
||||
this.changeLayout('1x2')
|
||||
this.isComparison = f
|
||||
|
|
@ -535,8 +539,6 @@ export default {
|
|||
})
|
||||
info0.ImageId = imageId
|
||||
info1.ImageId = newImageId
|
||||
console.log(info0)
|
||||
console.log(info1)
|
||||
let dicomCanvas0_info = Object.assign({
|
||||
instanceInfoList: [
|
||||
info0
|
||||
|
|
@ -549,8 +551,6 @@ export default {
|
|||
],
|
||||
imageIds: [newImageId]
|
||||
}, serie)
|
||||
console.log(dicomCanvas0_info, 'dicomCanvas0_info')
|
||||
console.log(dicomCanvas1_info, 'dicomCanvas0_info')
|
||||
this.$refs[`dicomCanvas0`].loadImageStack(dicomCanvas0_info)
|
||||
this.$refs[`dicomCanvas1`].loadImageStack(dicomCanvas1_info)
|
||||
})
|
||||
|
|
@ -565,7 +565,11 @@ export default {
|
|||
if (this.isComparison) return false
|
||||
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(async obj => {
|
||||
let { image } = obj
|
||||
let instanceInfo = this.series.instanceInfoList.find(item => item.ImageId === image.imageId)
|
||||
let instanceInfo = this.series.instanceInfoList.find(item => {
|
||||
let s1 = item.ImageId.split("?")[0]
|
||||
let s2 = image.imageId.split("?")[0]
|
||||
return s1 === s2
|
||||
})
|
||||
if (!instanceInfo.IsMasked) return this.$confirm(this.$t("DicomViewer:anonymous:notMasked"))
|
||||
let data = {
|
||||
// SeriesId: this.series.seriesId,
|
||||
|
|
@ -578,6 +582,7 @@ export default {
|
|||
let res = await this.studyUndoMaskImage(data)
|
||||
if (!res) return false
|
||||
this.$emit("update:loading", true)
|
||||
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) isAll = true
|
||||
if (!isAll) {
|
||||
let strs = image.imageId.split("?")
|
||||
let newImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${res[0].Path}?${strs[1]}`
|
||||
|
|
@ -597,12 +602,26 @@ export default {
|
|||
let strs = item.ImageId.split("?")
|
||||
let info = res.find(i => item.Id === i.Id)
|
||||
let newImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${info.Path}?${strs[1]}`
|
||||
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
|
||||
let strList = strs[1].split("&")
|
||||
let s = ''
|
||||
strList.forEach(item => {
|
||||
if (item.includes('frame=')) {
|
||||
s += `frame=${j}`
|
||||
} else {
|
||||
s += `&${item}`
|
||||
}
|
||||
})
|
||||
arr.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${info.Path}?${s}`)
|
||||
}
|
||||
} else {
|
||||
arr.push(newImageId)
|
||||
}
|
||||
item.ImageId = newImageId
|
||||
item.IsMasked = false
|
||||
arr.push(newImageId)
|
||||
})
|
||||
this.series.imageIds = arr
|
||||
console.log(this.series, 'this.series')
|
||||
// this.loadImageStack(this.series)
|
||||
this.$refs[`dicomCanvas0`].loadImageStack(this.series)
|
||||
}
|
||||
|
|
@ -615,7 +634,11 @@ export default {
|
|||
this.$refs[`dicomCanvas0`].getNote_RectangleRoi().then(async obj => {
|
||||
let { toolInfo, image } = obj
|
||||
if (!toolInfo || toolInfo.data.length <= 0) return this.$confirm(this.$t("DicomViewer:anonymous:notMark"))
|
||||
let instanceInfo = this.series.instanceInfoList.find(item => item.ImageId === image.imageId)
|
||||
let instanceInfo = this.series.instanceInfoList.find(item => {
|
||||
let s1 = item.ImageId.split("?")[0]
|
||||
let s2 = image.imageId.split("?")[0]
|
||||
return s1 === s2
|
||||
})
|
||||
let data = {
|
||||
// SeriesId: this.series.seriesId,
|
||||
instanceIdList: [instanceInfo.Id],
|
||||
|
|
@ -648,6 +671,7 @@ export default {
|
|||
let res = await this.studyMaskImage(data)
|
||||
if (!res || res.length <= 0) return this.$confirm(this.$t("DicomViewer:anonymous:studyMaskImageFail"))
|
||||
this.$emit("update:loading", true)
|
||||
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) isAll = true
|
||||
if (!isAll) {
|
||||
let strs = image.imageId.split("?")
|
||||
let newImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${res[0].Path}?${strs[1]}`
|
||||
|
|
@ -667,12 +691,26 @@ export default {
|
|||
let strs = item.ImageId.split("?")
|
||||
let info = res.find(i => item.Id === i.Id)
|
||||
let newImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${info.Path}?${strs[1]}`
|
||||
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < instanceInfo.NumberOfFrames; j++) {
|
||||
let strList = strs[1].split("&")
|
||||
let s = ''
|
||||
strList.forEach(item => {
|
||||
if (item.includes('frame=')) {
|
||||
s += `frame=${j}`
|
||||
} else {
|
||||
s += `&${item}`
|
||||
}
|
||||
})
|
||||
arr.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${info.Path}?${s}`)
|
||||
}
|
||||
} else {
|
||||
arr.push(newImageId)
|
||||
}
|
||||
item.ImageId = newImageId
|
||||
item.IsMasked = true
|
||||
arr.push(newImageId)
|
||||
})
|
||||
this.series.imageIds = arr
|
||||
console.log(this.series, 'this.series')
|
||||
// this.loadImageStack(this.series)
|
||||
this.$refs[`dicomCanvas0`].loadImageStack(this.series)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue