分割标记跳转修改
parent
d30c9a5f3b
commit
cbcb396441
|
|
@ -712,12 +712,12 @@ export default {
|
||||||
var studyUid = data.string('x0020000d')
|
var studyUid = data.string('x0020000d')
|
||||||
if (!studyUid) return resolve()
|
if (!studyUid) return resolve()
|
||||||
var pixelDataElement = data.elements.x7fe00010
|
var pixelDataElement = data.elements.x7fe00010
|
||||||
if (!pixelDataElement && modality !== 'SR') return resolve()
|
if (!pixelDataElement && modality !== 'SR' && modality !== 'ECG') return resolve()
|
||||||
var studyIndex = 0
|
var studyIndex = 0
|
||||||
while (
|
while (
|
||||||
studyIndex < scope.uploadQueues.length &&
|
studyIndex < scope.uploadQueues.length &&
|
||||||
scope.uploadQueues[studyIndex].dicomInfo.studyUid !== studyUid &&
|
scope.uploadQueues[studyIndex].dicomInfo.studyUid !== studyUid &&
|
||||||
(pixelDataElement || modality === 'SR') &&
|
(pixelDataElement || modality === 'SR' || modality === 'ECG') &&
|
||||||
modality != ''
|
modality != ''
|
||||||
) {
|
) {
|
||||||
++studyIndex
|
++studyIndex
|
||||||
|
|
|
||||||
|
|
@ -1720,7 +1720,7 @@ export default {
|
||||||
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (annotation.data.segmentation || annotation.data.segment) return
|
if (annotation.metadata.segmentationId) return
|
||||||
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
||||||
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
||||||
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
if (series && series.TaskInfo.VisitTaskId && series.TaskInfo.VisitTaskId === this.taskInfo.VisitTaskId) {
|
||||||
|
|
@ -1808,7 +1808,7 @@ export default {
|
||||||
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
if (annotation.metadata.toolName !== LabelMapEditWithContourTool.toolName) this.setToolsPassive()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (annotation.data.segmentation || annotation.data.segment) return
|
if (annotation.metadata.segmentationId) return
|
||||||
if (!annotation.data.label) return
|
if (!annotation.data.label) return
|
||||||
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
if (annotation.metadata.toolName === 'PlanarFreehandROI' && !annotation.data.contour.closed) return
|
||||||
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
const series = this.$refs[`${this.viewportKey}-${this.activeViewportIndex}`][0].series
|
||||||
|
|
@ -1839,7 +1839,7 @@ export default {
|
||||||
// 临时标记
|
// 临时标记
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (annotation.data.segmentation || annotation.data.segment) return
|
if (annotation.metadata.segmentationId) return
|
||||||
if (annotation.visitTaskId === this.taskInfo.VisitTaskId) {
|
if (annotation.visitTaskId === this.taskInfo.VisitTaskId) {
|
||||||
const isBound = this.$refs[`ecrf_${annotation.visitTaskId}`][0].verifyAnnotationIsBound(annotation)
|
const isBound = this.$refs[`ecrf_${annotation.visitTaskId}`][0].verifyAnnotationIsBound(annotation)
|
||||||
if (isBound && this.activeTool === 'Eraser') {
|
if (isBound && this.activeTool === 'Eraser') {
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
</el-switch>
|
</el-switch>
|
||||||
<span style="margin-left: 5px;">{{
|
<span style="margin-left: 5px;">{{
|
||||||
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
|
$t('trials:reading:Segmentations:title:InactiveSegmentationsShow')
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="SegmentConfig" v-if="SegmentConfig.InactiveSegmentations.show">
|
<!-- <div class="SegmentConfig" v-if="SegmentConfig.InactiveSegmentations.show">
|
||||||
<span>{{ $t('trials:reading:Segmentations:title:Opacity') }}</span>
|
<span>{{ $t('trials:reading:Segmentations:title:Opacity') }}</span>
|
||||||
|
|
@ -155,7 +155,7 @@
|
||||||
<div v-for="k in statsKey" :key="k" class="statsBox">
|
<div v-for="k in statsKey" :key="k" class="statsBox">
|
||||||
<span>{{ k }}</span>
|
<span>{{ k }}</span>
|
||||||
<span v-if="item.stats[k]">{{ Number(item.stats[k].value).toFixed(2)
|
<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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="serialNum" slot="reference">{{ item.segmentIndex }}</div>
|
<div class="serialNum" slot="reference">{{ item.segmentIndex }}</div>
|
||||||
|
|
@ -305,7 +305,7 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.SegmentHight = window.innerHeight > 900 ? window.innerHeight * 0.5 : window.innerHeight * 0.4;
|
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')
|
this.statsKey = getCustomizeStandardsSegmentDicomTools('Labelmap')[0].props.filter(item => item !== 'width' && item !== 'length')
|
||||||
// console.log(segmentation, 'segmentation')
|
console.log(segmentation, 'segmentation')
|
||||||
// console.log(annotation, 'annotation')
|
// console.log(annotation, 'annotation')
|
||||||
eventTarget.addEventListener(
|
eventTarget.addEventListener(
|
||||||
'CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED',
|
'CORNERSTONE_TOOLS_SEGMENTATION_DATA_MODIFIED',
|
||||||
|
|
@ -421,11 +421,12 @@ export default {
|
||||||
segmentIndex,
|
segmentIndex,
|
||||||
segmentationId: item.segmentationId,
|
segmentationId: item.segmentationId,
|
||||||
});
|
});
|
||||||
item.bidirectional = bidirectional
|
|
||||||
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
|
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === bidirectional.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
|
||||||
if (an) {
|
if (an) {
|
||||||
annotation.locking.setAnnotationLocked(an.annotationUID, true)
|
annotation.locking.setAnnotationLocked(an.annotationUID, true)
|
||||||
|
annotation.visibility.setAnnotationVisibility(an.annotationUID, item.bidirectionalView)
|
||||||
}
|
}
|
||||||
|
item.bidirectional = bidirectional
|
||||||
if (DATA) {
|
if (DATA) {
|
||||||
this.segmentationId = DATA.SegmentationId;
|
this.segmentationId = DATA.SegmentationId;
|
||||||
this.segmentIndex = DATA.SegmentMumber;
|
this.segmentIndex = DATA.SegmentMumber;
|
||||||
|
|
@ -481,16 +482,30 @@ export default {
|
||||||
}
|
}
|
||||||
this.resetViewport()
|
this.resetViewport()
|
||||||
},
|
},
|
||||||
jumpBidirectional(item) {
|
async jumpBidirectional(item) {
|
||||||
if (item.bidirectional) {
|
if (item.bidirectional) {
|
||||||
let an = annotation.state.getAllAnnotations().find(i => i.metadata.segmentationId === item.segmentationId && i.metadata.segmentIndex === item.segmentIndex && i.metadata.toolName === "SegmentBidirectional");
|
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')
|
||||||
if (!an) return false
|
if (!an) return false
|
||||||
let referencedImageId = an.metadata.referencedImageId;
|
|
||||||
let sliceIndex = metaData.get('generalImageModule', referencedImageId).instanceNumber
|
|
||||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||||
const viewportId = `${this.viewportKey}-${this.activeViewportIndex}`
|
const viewportId = `${this.viewportKey}-${this.activeViewportIndex}`
|
||||||
const viewport = renderingEngine.getViewport(viewportId)
|
const viewport = renderingEngine.getViewport(viewportId)
|
||||||
csUtils.jumpToSlice(viewport.element, { imageIndex: sliceIndex - 1 });
|
let key = Object.keys(an.data.cachedStats)[0]; // referencedImageId
|
||||||
|
if (key) {
|
||||||
|
let sliceIndex = key.split("?")[1].split("&")[0].split("=")[1]
|
||||||
|
csUtils.jumpToSlice(viewport.element, { imageIndex: sliceIndex });
|
||||||
|
} else {
|
||||||
|
const points = an.data.handles.points;
|
||||||
|
const worldPoint = points[0]; // 取一个点
|
||||||
|
let imageData = cache.getVolume(this.series.SeriesInstanceUid).imageData
|
||||||
|
const ijk = imageData.worldToIndex(worldPoint);
|
||||||
|
const sliceIndex = Math.abs(Math.round(ijk[2]));
|
||||||
|
let imageIds = viewport.getImageIds(this.series.SeriesInstanceUid)
|
||||||
|
// console.log(sliceIndex, 'sliceIndex')
|
||||||
|
csUtils.jumpToSlice(viewport.element, { imageIndex: imageIds.length - sliceIndex - 1 });
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
viewSegmentGroup(item) {
|
viewSegmentGroup(item) {
|
||||||
|
|
@ -542,7 +557,8 @@ export default {
|
||||||
this.viewprotIds.forEach(id => {
|
this.viewprotIds.forEach(id => {
|
||||||
segmentation.activeSegmentation.setActiveSegmentation(id, this.segmentationId)
|
segmentation.activeSegmentation.setActiveSegmentation(id, this.segmentationId)
|
||||||
})
|
})
|
||||||
this.selectSegment({ segmentationId: this.segmentationId, segmentIndex: 1 })
|
let segment = this.segmentList.find(item => item.segmentationId === this.segmentationId).segments[0]
|
||||||
|
this.selectSegment(segment)
|
||||||
this.readingSegmentByConfig()
|
this.readingSegmentByConfig()
|
||||||
},
|
},
|
||||||
async addSegmentGroup() {
|
async addSegmentGroup() {
|
||||||
|
|
@ -687,7 +703,8 @@ export default {
|
||||||
let s = this.segmentList[groupIndex].segments.find(item => item.segmentIndex === segmentIndex)
|
let s = this.segmentList[groupIndex].segments.find(item => item.segmentIndex === segmentIndex)
|
||||||
let res = await this.deleteSegment(s.id)
|
let res = await this.deleteSegment(s.id)
|
||||||
if (!res) return false
|
if (!res) return false
|
||||||
segmentation.removeSegment(this.segmentationId, Number(segmentIndex), { setNextSegmentAsActive: false })
|
segmentation.removeSegment(this.segmentationId, Number(segmentIndex), { setNextSegmentAsActive: false, recordHistory: false })
|
||||||
|
segmentation.helpers.clearSegmentValue(this.segmentationId, Number(segmentIndex), { recordHistory: false })
|
||||||
// segmentation.updateSegmentations({ segmentationId: this.segmentationId })
|
// segmentation.updateSegmentations({ segmentationId: this.segmentationId })
|
||||||
let index = this.segmentList[groupIndex].segments.findIndex(item => item.segmentIndex === segmentIndex)
|
let index = this.segmentList[groupIndex].segments.findIndex(item => item.segmentIndex === segmentIndex)
|
||||||
this.segmentList[groupIndex].segments.splice(index, 1)
|
this.segmentList[groupIndex].segments.splice(index, 1)
|
||||||
|
|
@ -775,9 +792,11 @@ export default {
|
||||||
segmentList.forEach(segment => {
|
segmentList.forEach(segment => {
|
||||||
this.viewBidirectional(segment.segments, this.SegmentConfig.InactiveSegmentations.show)
|
this.viewBidirectional(segment.segments, this.SegmentConfig.InactiveSegmentations.show)
|
||||||
})
|
})
|
||||||
let segments = this.segmentList.find(item => item.segmentationId === this.segmentationId).segments
|
let segmentGroup = this.segmentList.find(item => item.segmentationId === this.segmentationId)
|
||||||
this.viewBidirectional(segments, true)
|
if (segmentGroup) {
|
||||||
|
let segments = segmentGroup.segments
|
||||||
|
this.viewBidirectional(segments, true)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 更改分割标记显示模式
|
// 更改分割标记显示模式
|
||||||
changeSegmentConfig(renderOutline, renderFill) {
|
changeSegmentConfig(renderOutline, renderFill) {
|
||||||
|
|
@ -850,25 +869,28 @@ export default {
|
||||||
color.slice(0, 3).map(value => value / 255)
|
color.slice(0, 3).map(value => value / 255)
|
||||||
).map(value => Math.round(value));
|
).map(value => Math.round(value));
|
||||||
let segment = group.segments.find(item => item.segmentIndex === segmentIndex)
|
let segment = group.segments.find(item => item.segmentIndex === segmentIndex)
|
||||||
let SegmentLabel = segment.SegmentLabel
|
if (segment) {
|
||||||
const segmentMetadata = {
|
let SegmentLabel = segment.SegmentLabel
|
||||||
SegmentNumber: segmentIndex.toString(),
|
const segmentMetadata = {
|
||||||
SegmentLabel: SegmentLabel,
|
SegmentNumber: segmentIndex.toString(),
|
||||||
SegmentAlgorithmType: "MANUAL",
|
SegmentLabel: SegmentLabel,
|
||||||
SegmentAlgorithmName: "OHIF Brush",
|
SegmentAlgorithmType: "MANUAL",
|
||||||
RecommendedDisplayCIELabValue,
|
SegmentAlgorithmName: "OHIF Brush",
|
||||||
SegmentedPropertyCategoryCodeSequence: {
|
RecommendedDisplayCIELabValue,
|
||||||
CodeValue: "T-D0050",
|
SegmentedPropertyCategoryCodeSequence: {
|
||||||
CodingSchemeDesignator: "SRT",
|
CodeValue: "T-D0050",
|
||||||
CodeMeaning: "Tissue"
|
CodingSchemeDesignator: "SRT",
|
||||||
},
|
CodeMeaning: "Tissue"
|
||||||
SegmentedPropertyTypeCodeSequence: {
|
},
|
||||||
CodeValue: "T-D0050",
|
SegmentedPropertyTypeCodeSequence: {
|
||||||
CodingSchemeDesignator: "SRT",
|
CodeValue: "T-D0050",
|
||||||
CodeMeaning: "Tissue"
|
CodingSchemeDesignator: "SRT",
|
||||||
}
|
CodeMeaning: "Tissue"
|
||||||
};
|
}
|
||||||
if (segment.bidirectional && segment.stats) labelmap3D.metadata[segmentIndex] = segmentMetadata;
|
};
|
||||||
|
|
||||||
|
if (segment.bidirectional && segment.stats) labelmap3D.metadata[segmentIndex] = segmentMetadata;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (labelmap3D.metadata.length <= 0) {
|
if (labelmap3D.metadata.length <= 0) {
|
||||||
return false
|
return false
|
||||||
|
|
|
||||||
|
|
@ -891,12 +891,12 @@ export default {
|
||||||
var studyUid = data.string('x0020000d')
|
var studyUid = data.string('x0020000d')
|
||||||
if (!studyUid) return resolve()
|
if (!studyUid) return resolve()
|
||||||
var pixelDataElement = data.elements.x7fe00010
|
var pixelDataElement = data.elements.x7fe00010
|
||||||
if (!pixelDataElement && modality !== 'SR') return resolve()
|
if (!pixelDataElement && modality !== 'SR' && modality !== 'ECG') return resolve()
|
||||||
var studyIndex = 0
|
var studyIndex = 0
|
||||||
while (
|
while (
|
||||||
studyIndex < scope.uploadQueues.length &&
|
studyIndex < scope.uploadQueues.length &&
|
||||||
scope.uploadQueues[studyIndex].dicomInfo.studyUid !== studyUid &&
|
scope.uploadQueues[studyIndex].dicomInfo.studyUid !== studyUid &&
|
||||||
(pixelDataElement || modality === 'SR') &&
|
(pixelDataElement || modality === 'SR' || modality === 'ECG') &&
|
||||||
modality != ''
|
modality != ''
|
||||||
) {
|
) {
|
||||||
++studyIndex
|
++studyIndex
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue