分割部分问题解决
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c12833d283
commit
7001bc9ec0
|
|
@ -225,7 +225,7 @@ export default {
|
||||||
DicomEvent.$on('renderSegmentation', async (viewportId) => {
|
DicomEvent.$on('renderSegmentation', async (viewportId) => {
|
||||||
// if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
// if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||||
if (this.viewportId !== viewportId) return false
|
if (this.viewportId !== viewportId) return false
|
||||||
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.segmentationId, this.segmentIndex, this.renderingEngineId, null, this.actionConfiguration)
|
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, null, this.actionConfiguration)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -612,8 +612,8 @@ export default {
|
||||||
renderingEngine.render()
|
renderingEngine.render()
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.segmentationId, this.segmentIndex, this.renderingEngineId, null, this.actionConfiguration)
|
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, null, this.actionConfiguration)
|
||||||
DicomEvent.$emit('loading', this.viewportId)
|
DicomEvent.$emit('SegmentationLoading', this.viewportId)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3212,6 +3212,11 @@ export default {
|
||||||
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
|
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.readingTool === 3) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
DicomEvent.$emit('SegmentationLoading', `${this.viewportKey}-${this.activeViewportIndex}`)
|
||||||
|
})
|
||||||
|
}
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
},
|
},
|
||||||
getRelatedSeries(visitTaskInfo, baselineSeries) {
|
getRelatedSeries(visitTaskInfo, baselineSeries) {
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,7 @@ export default {
|
||||||
let { segment, isChange = true, viewportId, series } = data
|
let { segment, isChange = true, viewportId, series } = data
|
||||||
DicomEvent.$emit('renderSegmentation', viewportId)
|
DicomEvent.$emit('renderSegmentation', viewportId)
|
||||||
})
|
})
|
||||||
DicomEvent.$on('loading', (viewportId) => {
|
DicomEvent.$on('SegmentationLoading', (viewportId) => {
|
||||||
if (viewportId !== `${this.viewportKey}-${this.activeViewportIndex}`) return false
|
if (viewportId !== `${this.viewportKey}-${this.activeViewportIndex}`) return false
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
|
@ -1625,6 +1625,7 @@ export default {
|
||||||
// 获取分割组
|
// 获取分割组
|
||||||
async getSegmentationList(SEGMENT = null) {
|
async getSegmentationList(SEGMENT = null) {
|
||||||
try {
|
try {
|
||||||
|
this.$emit('setToolsPassive')
|
||||||
let data = {
|
let data = {
|
||||||
SeriesId: this.series.Id,
|
SeriesId: this.series.Id,
|
||||||
VisitTaskId: this.series.TaskInfo.VisitTaskId,
|
VisitTaskId: this.series.TaskInfo.VisitTaskId,
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ export default {
|
||||||
DicomEvent.$on('renderSegmentation', async (viewportId) => {
|
DicomEvent.$on('renderSegmentation', async (viewportId) => {
|
||||||
// if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
// if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||||
if (this.viewportId !== viewportId) return false
|
if (this.viewportId !== viewportId) return false
|
||||||
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.segmentationId, this.segmentIndex, this.renderingEngineId, null, this.actionConfiguration)
|
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, null, this.actionConfiguration)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -674,8 +674,8 @@ export default {
|
||||||
renderingEngine.render()
|
renderingEngine.render()
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.segmentationId, this.segmentIndex, this.renderingEngineId, data.segment, this.actionConfiguration)
|
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, data.segment, this.actionConfiguration)
|
||||||
DicomEvent.$emit('loading', this.viewportId)
|
DicomEvent.$emit('SegmentationLoading', this.viewportId)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -341,7 +341,7 @@ function resetViewport(viewportId) {
|
||||||
function changeColor(item, viewportId) {
|
function changeColor(item, viewportId) {
|
||||||
segmentation.config.color.setSegmentIndexColor(viewportId, item.segmentationId, item.segmentIndex, hex2Rgb(item.color))
|
segmentation.config.color.setSegmentIndexColor(viewportId, item.segmentationId, item.segmentIndex, hex2Rgb(item.color))
|
||||||
}
|
}
|
||||||
async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig, segmentationId, segmentIndex, RenderingEngineId, Segment = null, actionConfiguration) {
|
async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig, RenderingEngineId, Segment = null, actionConfiguration) {
|
||||||
try {
|
try {
|
||||||
// console.log(segmentation, 'segmentation')
|
// console.log(segmentation, 'segmentation')
|
||||||
renderingEngineId = RenderingEngineId
|
renderingEngineId = RenderingEngineId
|
||||||
|
|
@ -352,12 +352,14 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
|
||||||
PageSize: 9999,
|
PageSize: 9999,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
}
|
}
|
||||||
|
let segmentationId = null;
|
||||||
|
let segmentIndex = null;
|
||||||
let res = await getSegmentationList(data);
|
let res = await getSegmentationList(data);
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
let list = res.Result.CurrentPageData;
|
let list = res.Result.CurrentPageData;
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
let item = list[i]
|
let item = list[i]
|
||||||
|
if (!segmentationId) segmentationId = item.Id
|
||||||
await createSegmentation(viewportId, series.SeriesInstanceUid, item.Id)
|
await createSegmentation(viewportId, series.SeriesInstanceUid, item.Id)
|
||||||
if (item.SEGUrl) await readSegmentation(item.SEGUrl, series, item.Id)
|
if (item.SEGUrl) await readSegmentation(item.SEGUrl, series, item.Id)
|
||||||
createSegmentationRepresentation(viewportId, item.Id)
|
createSegmentationRepresentation(viewportId, item.Id)
|
||||||
|
|
@ -375,6 +377,7 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
|
||||||
if (r.IsSuccess) {
|
if (r.IsSuccess) {
|
||||||
let segments = r.Result.CurrentPageData
|
let segments = r.Result.CurrentPageData
|
||||||
segments.forEach(s => {
|
segments.forEach(s => {
|
||||||
|
if (!segmentIndex) segmentIndex = s.SegmentNumber
|
||||||
let SegmentJson = s.SegmentJson ? JSON.parse(s.SegmentJson) : {};
|
let SegmentJson = s.SegmentJson ? JSON.parse(s.SegmentJson) : {};
|
||||||
segmentation.segmentIndex.setActiveSegmentIndex(s.SegmentationId, s.SegmentNumber);
|
segmentation.segmentIndex.setActiveSegmentIndex(s.SegmentationId, s.SegmentNumber);
|
||||||
segmentation.config.color.setSegmentIndexColor(viewportId, s.SegmentationId, s.SegmentNumber, hex2Rgb(s.ColorRgb))
|
segmentation.config.color.setSegmentIndexColor(viewportId, s.SegmentationId, s.SegmentNumber, hex2Rgb(s.ColorRgb))
|
||||||
|
|
@ -406,7 +409,10 @@ async function renderSegmentation(series, visitInfo, viewportId, SegmentConfig,
|
||||||
// }
|
// }
|
||||||
// this.getBidirectional(obj.segments, null, false)
|
// this.getBidirectional(obj.segments, null, false)
|
||||||
// })
|
// })
|
||||||
|
if (segmentationId && segmentIndex) {
|
||||||
selectSegment(viewportId, segmentationId, segmentIndex)
|
selectSegment(viewportId, segmentationId, segmentIndex)
|
||||||
|
}
|
||||||
|
|
||||||
if (Segment) {
|
if (Segment) {
|
||||||
jumpBidirectional(Segment, viewportId, series.SeriesInstanceUid)
|
jumpBidirectional(Segment, viewportId, series.SeriesInstanceUid)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue