|
|
|
|
@ -523,7 +523,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
|
|
|
|
|
@ -543,8 +547,6 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
info0.ImageId = imageId
|
|
|
|
|
info1.ImageId = newImageId
|
|
|
|
|
console.log(info0)
|
|
|
|
|
console.log(info1)
|
|
|
|
|
let dicomCanvas0_info = Object.assign({
|
|
|
|
|
instanceInfoList: [
|
|
|
|
|
info0
|
|
|
|
|
@ -557,8 +559,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)
|
|
|
|
|
})
|
|
|
|
|
@ -573,7 +573,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,
|
|
|
|
|
@ -586,6 +590,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]}`
|
|
|
|
|
@ -605,12 +610,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)
|
|
|
|
|
}
|
|
|
|
|
@ -623,7 +642,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],
|
|
|
|
|
@ -656,6 +679,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]}`
|
|
|
|
|
@ -675,12 +699,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)
|
|
|
|
|
}
|
|
|
|
|
|