Compare commits
2 Commits
2efb7fd36a
...
b77dc34523
| Author | SHA1 | Date |
|---|---|---|
|
|
b77dc34523 | |
|
|
91554e0e30 |
|
|
@ -465,12 +465,15 @@ export default {
|
|||
},
|
||||
async createImageIdsAndCacheMetaData(obj) {
|
||||
this.loading = true
|
||||
await createImageIdsAndCacheMetaData({
|
||||
try {
|
||||
return await createImageIdsAndCacheMetaData({
|
||||
modality: obj.Modality,
|
||||
imageIds: obj.ImageIds
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
})
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async setSeriesInfo(obj, isLocate = false) {
|
||||
try {
|
||||
let data = obj
|
||||
|
|
|
|||
|
|
@ -531,7 +531,7 @@ export default {
|
|||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
getFusionVolumes() {
|
||||
const ctVolumeId = this.ctSeries?.SeriesInstanceUid
|
||||
const ptFusionVolumeId = this.ptVolumeId
|
||||
|
|
|
|||
|
|
@ -1601,12 +1601,18 @@ export default {
|
|||
// })
|
||||
},
|
||||
renderAnnotations(series) {
|
||||
if (series.SeriesInstanceUid) {
|
||||
let volume = cache.getVolume(series.SeriesInstanceUid)
|
||||
// console.log(volume.metadata.FrameOfReferenceUID);
|
||||
}
|
||||
|
||||
const taskId = series.TaskInfo ? series.TaskInfo.VisitTaskId : null
|
||||
if (!taskId || this.renderedTaskIds.includes(taskId)) return
|
||||
this.renderedTaskIds.push(taskId)
|
||||
const taskIdx = this.visitTaskList.findIndex(i => i.VisitTaskId === taskId)
|
||||
if (taskIdx === -1) return
|
||||
const annotations = this.visitTaskList[taskIdx].Annotations
|
||||
console.log(annotations, 'annotations')
|
||||
annotations.map(i => {
|
||||
if (i.MeasureData && !Object.hasOwn(i.MeasureData, 'isDicomReading')) {
|
||||
const annotation = i.MeasureData
|
||||
|
|
@ -3107,7 +3113,6 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log(series, 'series')
|
||||
this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].setSeriesInfo(series, obj.segment ? false : true)
|
||||
this.$refs[series.TaskInfo.VisitTaskId][0].setSeriesActive(series.StudyIndex, series.SeriesIndex)
|
||||
}
|
||||
|
|
@ -3697,11 +3702,11 @@ export default {
|
|||
if (cache.getVolume(volumeId)) {
|
||||
volume = cache.getVolume(volumeId)
|
||||
} else {
|
||||
await this.$refs[`${this.viewportKey}-0`][0].createImageIdsAndCacheMetaData(serie)
|
||||
let imageIds = await this.$refs[`${this.viewportKey}-0`][0].createImageIdsAndCacheMetaData(serie)
|
||||
// imageIds = this.sortImageIdsByImagePositionPatient(imageIds)
|
||||
volume = await volumeLoader.createAndCacheVolume(volumeId, { imageIds: serie.ImageIds })
|
||||
volume = await volumeLoader.createAndCacheVolume(volumeId, { imageIds: imageIds })
|
||||
volume.load()
|
||||
}
|
||||
}
|
||||
res({ volumeId, volume })
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
<div :class="['tool-item', activeTool === 'CircularEraser' && segmentList.length > 0 ? 'tool-item-active' : '']"
|
||||
:style="{ cursor: segmentList.length <= 0 || (curSegment && curSegment.lock) ? 'not-allowed' : 'pointer' }"
|
||||
:title="$t('trials:dicom-show:segmentEraser')" @click.prevent="setToolActive('CircularEraser')">
|
||||
:title="$t('trials:dicom-show:Eraser')" @click.prevent="setToolActive('CircularEraser')">
|
||||
<svg-icon icon-class="clear" class="svg-icon" />
|
||||
</div>
|
||||
<!-- <div :class="['tool-item']">
|
||||
|
|
@ -120,7 +120,7 @@
|
|||
</el-switch>
|
||||
<span style="margin-left: 5px;">{{
|
||||
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
|
||||
}}</span>
|
||||
}}</span>
|
||||
</div>
|
||||
<!-- <div class="SegmentConfig" v-if="SegmentConfig.InactiveSegmentations.show">
|
||||
<span>{{ $t('trials:reading:Segmentations:title:Opacity') }}</span>
|
||||
|
|
@ -176,7 +176,7 @@
|
|||
<template v-else>
|
||||
<div class="num">
|
||||
<span>L:{{ Number(item.bidirectional.maxMajor).toFixed(2) }} mm</span>
|
||||
<span>W:{{ Number(item.bidirectional.maxMinor).toFixed(2) }} mm</span>
|
||||
<span>s:{{ Number(item.bidirectional.maxMinor).toFixed(2) }} mm</span>
|
||||
</div>
|
||||
<div class="btnBox">
|
||||
<svg-icon :icon-class="!item.bidirectionalView ? 'eye' : 'eye-open'"
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
<div v-for="k in statsKey" :key="k" class="statsBox">
|
||||
<span>{{ k }}</span>
|
||||
<span v-if="item.stats[k]">{{ Number(item.stats[k].value).toFixed(2)
|
||||
}}<i>{{ item.stats[k].unit }}</i></span>
|
||||
}}<i>{{ item.stats[k].unit }}</i></span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="serialNum" slot="reference">{{ index + 1 }}</div>
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
</el-collapse>
|
||||
<div class="saveBtnBox">
|
||||
<el-button type="success" size="small" @click="saveSegmentGroup()">{{ $t("common:button:save")
|
||||
}}</el-button>
|
||||
}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -368,8 +368,6 @@ export default {
|
|||
})
|
||||
DicomEvent.$on('isloaded', (data) => {
|
||||
let { segment } = data
|
||||
this.drawing = false
|
||||
this.isDel = false
|
||||
this.delAllSegment()
|
||||
this.getSegmentationList(segment)
|
||||
})
|
||||
|
|
@ -461,6 +459,7 @@ export default {
|
|||
list.forEach(item => {
|
||||
this.createSegmentConfiguration(item.segmentIndex, item.segmentationId);
|
||||
})
|
||||
|
||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||
const viewportId = `${this.viewportKey}-${this.activeViewportIndex}`
|
||||
const viewport = renderingEngine.getViewport(viewportId);
|
||||
|
|
@ -565,7 +564,7 @@ export default {
|
|||
async jumpBidirectional(item) {
|
||||
if (item.bidirectional) {
|
||||
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
|
||||
// console.log(an, 'an')
|
||||
console.log(an, 'an')
|
||||
if (!an) return false
|
||||
|
||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||
|
|
@ -828,6 +827,7 @@ export default {
|
|||
},
|
||||
async customPrompt() {
|
||||
try {
|
||||
console.log(annotation.state.getAllAnnotations(), 'annotation.state.getAllAnnotations()')
|
||||
const that = this
|
||||
// 请输入标记名称
|
||||
let message = this.$t('trials:reading:Segmentations:message:rename')
|
||||
|
|
@ -1139,6 +1139,7 @@ export default {
|
|||
if (toolName === 'ThresholdSphere') {
|
||||
this.setDynamicRadius()
|
||||
}
|
||||
console.log(this.brushThreshold.dynamicRadius, 'this.brushThreshold.dynamicRadius')
|
||||
},
|
||||
setDynamicRadius() {
|
||||
let volume = cache.getVolume(this.series.SeriesInstanceUid);
|
||||
|
|
@ -1191,7 +1192,6 @@ export default {
|
|||
segmentationModifiedCallback(evt) {
|
||||
const { detail } = evt;
|
||||
// console.log(detail)
|
||||
if (!detail.modifiedSlicesToUse) return
|
||||
if (detail.segmentIndex === 0) {
|
||||
this.drawing = true
|
||||
this.isDel = true
|
||||
|
|
@ -1201,7 +1201,6 @@ export default {
|
|||
return;
|
||||
}
|
||||
this.drawing = true
|
||||
if (this.activeTool === LabelMapEditWithContourTool.toolName) this.contentMouseup()
|
||||
},
|
||||
async calculateStatistics(indices, segmentationId, mode) {
|
||||
if (!segmentation.state.getSegmentation(segmentationId)) return false
|
||||
|
|
@ -1210,6 +1209,7 @@ export default {
|
|||
segmentIndices: indices,
|
||||
mode,
|
||||
});
|
||||
console.log(stats)
|
||||
if (mode === 'individual') {
|
||||
const segmentStats = stats;
|
||||
|
||||
|
|
@ -1431,7 +1431,6 @@ export default {
|
|||
let res = await getSegmentationList(data);
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.segmentationId = null;
|
||||
this.segmentList = []
|
||||
let list = res.Result.CurrentPageData;
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
|
|
|
|||
|
|
@ -282,13 +282,6 @@ export default {
|
|||
this.imageInfo.location = imagePlaneModule.sliceLocation
|
||||
this.imageInfo.total = detail.numberOfSlices
|
||||
this.getOrientationMarker()
|
||||
|
||||
let annotations = cornerstoneTools.annotation.state.getAllAnnotations().filter(item => item.metadata.toolName !== 'ScaleOverlay' && item.metadata.volumeId !== this.volumeId && !item.metadata.segmentationId)
|
||||
// console.log(annotations, 'annotations')
|
||||
annotations.forEach(item => {
|
||||
cornerstoneTools.annotation.state.removeAnnotation(item.annotationUID)
|
||||
})
|
||||
|
||||
this.$emit('renderAnnotations', this.series)
|
||||
let properties = viewport.getProperties()
|
||||
if (this.isFusion) {
|
||||
|
|
@ -487,12 +480,15 @@ export default {
|
|||
},
|
||||
async createImageIdsAndCacheMetaData(obj) {
|
||||
this.loading = true
|
||||
await createImageIdsAndCacheMetaData({
|
||||
try {
|
||||
return await createImageIdsAndCacheMetaData({
|
||||
modality: obj.Modality,
|
||||
imageIds: obj.ImageIds
|
||||
})
|
||||
} finally {
|
||||
this.loading = false
|
||||
},
|
||||
}
|
||||
},
|
||||
async getVolume(serie, isFusion = false) {
|
||||
return new Promise(async res => {
|
||||
let volumeId = `${isFusion ? 'fusion_' : ''}` + serie.SeriesInstanceUid;
|
||||
|
|
|
|||
Loading…
Reference in New Issue