导入分割数据与分段进行绑定
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
5336cb5353
commit
64d1ebf350
|
|
@ -1585,7 +1585,7 @@ export default {
|
|||
// })
|
||||
},
|
||||
renderAnnotations(series) {
|
||||
const taskId = series.TaskInfo.VisitTaskId
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,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>
|
||||
|
|
@ -155,7 +155,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">{{ item.segmentIndex }}</div>
|
||||
|
|
@ -305,7 +305,7 @@ export default {
|
|||
mounted() {
|
||||
this.SegmentHight = window.innerHeight > 900 ? window.innerHeight * 0.5 : window.innerHeight * 0.4;
|
||||
this.statsKey = getCustomizeStandardsSegmentDicomTools('Labelmap')[0].props.filter(item => item !== 'width' && item !== 'length')
|
||||
console.log(segmentation, 'segmentation')
|
||||
// console.log(segmentation, 'segmentation')
|
||||
// console.log(annotation, 'annotation')
|
||||
eventTarget.addEventListener(
|
||||
'CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED',
|
||||
|
|
@ -397,7 +397,6 @@ export default {
|
|||
segmentationId: item.segmentationId,
|
||||
segmentIndices: [item.segmentIndex],
|
||||
});
|
||||
// console.log(bidirectionalData, 'bidirectionalData')
|
||||
if (bidirectionalData.length <= 0) {
|
||||
let annotations = annotation.state.getAllAnnotations().filter(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex);
|
||||
annotations.forEach(i => {
|
||||
|
|
@ -906,6 +905,9 @@ export default {
|
|||
labelmap3D,
|
||||
metaData
|
||||
);
|
||||
group.segments.forEach((item, index) => {
|
||||
generatedSegmentation.dataset.SegmentSequence[index].SegmentNumber = item.segmentIndex.toString()
|
||||
})
|
||||
if (!isFile) {
|
||||
const buffer = Buffer.from(dcmjs.data.datasetToDict(generatedSegmentation.dataset).write());
|
||||
let blob = new Blob([buffer], { type: "application/dicom" });
|
||||
|
|
@ -971,7 +973,6 @@ export default {
|
|||
arrayBuffer,
|
||||
metaData,
|
||||
);
|
||||
|
||||
if (generateToolState.labelmapBufferArray.length !== 1) {
|
||||
alert(
|
||||
"Overlapping segments in your segmentation are not supported yet. You can turn on the skipOverlapping option but it will override the overlapping segments."
|
||||
|
|
@ -991,12 +992,28 @@ export default {
|
|||
const volumeScalarData = new Uint8Array(
|
||||
generateToolState.labelmapBufferArray[0]
|
||||
);
|
||||
const remappedData = new Uint8Array(volumeScalarData.length);
|
||||
|
||||
let mapping = {}
|
||||
let segments = await this.getSegmentList(segmentationId)
|
||||
if (segments.length > 0) {
|
||||
segments.forEach(item => {
|
||||
let SegmentJson = item.SegmentJson ? JSON.parse(item.SegmentJson) : {};
|
||||
if (SegmentJson.bidirectional && SegmentJson.stats) {
|
||||
let keys = Object.keys(mapping)
|
||||
mapping[keys.length + 1] = Number(item.SegmentMumber)
|
||||
}
|
||||
})
|
||||
}
|
||||
for (let i = 0; i < volumeScalarData.length; i++) {
|
||||
const value = volumeScalarData[i];
|
||||
remappedData[i] = value === 0 ? 0 : (mapping[value] ? mapping[value] : 0);
|
||||
}
|
||||
for (let i = 0; i < derivedSegmentationImages.length; i++) {
|
||||
const voxelManager = derivedSegmentationImages[i].voxelManager;
|
||||
const scalarData = voxelManager.getScalarData();
|
||||
scalarData.set(
|
||||
volumeScalarData.slice(
|
||||
remappedData.slice(
|
||||
i * scalarData.length,
|
||||
(i + 1) * scalarData.length
|
||||
)
|
||||
|
|
@ -1227,6 +1244,7 @@ export default {
|
|||
})
|
||||
// 生成文件路径
|
||||
let blob = this.exportSegmentation(segmentGroup.segmentationId, segmentGroup)
|
||||
// if (!blob) return false
|
||||
if (blob) {
|
||||
let path = `/${this.$route.query.trialId}/Segment/${this.visitInfo.SubjectId
|
||||
}/${this.visitInfo.VisistId}/${this.series.StudyId
|
||||
|
|
@ -1328,13 +1346,14 @@ export default {
|
|||
// this.getBidirectional(o)
|
||||
// })
|
||||
if (SEGMENT && index === segments.length - 1) {
|
||||
console.log(SEGMENT, 'SEGMENT')
|
||||
// console.log(SEGMENT, 'SEGMENT')
|
||||
return this.getBidirectional(o, SEGMENT)
|
||||
}
|
||||
this.getBidirectional(o)
|
||||
})
|
||||
}
|
||||
}
|
||||
// console.log(segmentation.state.getSegmentations(), 'segmentation.state.getSegmentations()')
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue