suv融合
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
8eb0b96c8e
commit
00cfb92087
File diff suppressed because it is too large
Load Diff
|
@ -205,7 +205,7 @@ export default {
|
|||
}
|
||||
})
|
||||
this.element.oncontextmenu = (e) => e.preventDefault()
|
||||
resizeObserver.observe(this.element)
|
||||
// resizeObserver.observe(this.element)
|
||||
this.element.addEventListener("CORNERSTONE_VOLUME_NEW_IMAGE", this.stackNewImage)
|
||||
this.element.addEventListener('CORNERSTONE_VOI_MODIFIED', this.voiModified)
|
||||
|
||||
|
@ -245,7 +245,10 @@ export default {
|
|||
this.imageInfo.location = imagePlaneModule.sliceLocation
|
||||
this.getOrientationMarker()
|
||||
// this.$emit('renderAnnotations', this.series)
|
||||
var properties = viewport.getProperties()
|
||||
let properties = viewport.getProperties()
|
||||
if (this.isFusion) {
|
||||
properties = viewport.getProperties(this.ptVolumeId)
|
||||
}
|
||||
|
||||
if (properties && properties.voiRange) {
|
||||
var { lower, upper } = properties.voiRange
|
||||
|
@ -264,7 +267,10 @@ export default {
|
|||
voiModified(e) {
|
||||
const renderingEngine = getRenderingEngine(this.renderingEngineId)
|
||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||
const properties = viewport.getProperties()
|
||||
let properties = viewport.getProperties()
|
||||
if (this.isFusion) {
|
||||
properties = viewport.getProperties(this.volumeId)
|
||||
}
|
||||
if (properties && properties.voiRange) {
|
||||
var { lower, upper } = properties.voiRange
|
||||
const { windowWidth, windowCenter } = csUtils.windowLevel.toWindowLevel(
|
||||
|
@ -387,29 +393,18 @@ export default {
|
|||
const voiRange = { lower: 0, upper: v }
|
||||
const viewport = renderingEngine.getViewport(this.viewportId)
|
||||
if (!viewport) return
|
||||
let volumeId = this.isFusion ? this.ptVolumeId : this.volumeId
|
||||
const viewportsContainingVolumeUID = csUtils.getViewportsWithVolumeId(
|
||||
this.volumeId,
|
||||
volumeId,
|
||||
viewport.renderingEngineId
|
||||
)
|
||||
|
||||
viewport.setProperties({ voiRange }, this.volumeId)
|
||||
viewport.setProperties({ voiRange }, volumeId)
|
||||
viewportsContainingVolumeUID.forEach((vp) => {
|
||||
vp.render()
|
||||
// this.$refs[vp.id].voiModified()
|
||||
this.voiModified()
|
||||
})
|
||||
if (this.ptVolumeId) {
|
||||
const viewportsContainingVolumeUIDPT = csUtils.getViewportsWithVolumeId(
|
||||
this.ptVolumeId,
|
||||
viewport.renderingEngineId
|
||||
)
|
||||
|
||||
viewport.setProperties({ voiRange }, this.ptVolumeId)
|
||||
viewportsContainingVolumeUIDPT.forEach((vp) => {
|
||||
vp.render()
|
||||
this.voiModified()
|
||||
})
|
||||
}
|
||||
},
|
||||
renderColorBar(presetName) {
|
||||
var colorMap = null
|
||||
|
|
|
@ -582,9 +582,10 @@ const {
|
|||
EraserTool,
|
||||
MIPJumpToClickTool,
|
||||
VolumeRotateTool,
|
||||
synchronizers
|
||||
// cursors
|
||||
} = cornerstoneTools
|
||||
|
||||
const { createCameraPositionSynchronizer, createVOISynchronizer } = synchronizers;
|
||||
const newStyles = {
|
||||
global: {
|
||||
color: 'rgb(255, 0, 0)',
|
||||
|
@ -702,6 +703,7 @@ export default {
|
|||
isFusion: false,
|
||||
studyList: [],
|
||||
volumeData: {},
|
||||
fusionSerieId: {},
|
||||
loadingText: null
|
||||
}
|
||||
},
|
||||
|
@ -1221,6 +1223,9 @@ export default {
|
|||
|
||||
eventTarget.addEventListener('cornerstoneimageloadprogress', this.imageLoadProgress)
|
||||
console.log(Events, toolsEvents)
|
||||
if ( this.readingTool === 2 ) {
|
||||
this.setUpSynchronizers()
|
||||
}
|
||||
},
|
||||
// 影像下载进度回调
|
||||
imageLoadProgress(e) {
|
||||
|
@ -2625,6 +2630,67 @@ export default {
|
|||
}, delay)
|
||||
}
|
||||
},
|
||||
// 融合视口相机同步
|
||||
setUpSynchronizers() {
|
||||
let axialCameraPositionSynchronizer = createCameraPositionSynchronizer(
|
||||
'AXIAL_CAMERA_SYNCHRONIZER_ID'
|
||||
);
|
||||
let ctVoiSynchronizer = createVOISynchronizer('CT_VOI_SYNCHRONIZER_ID', {
|
||||
syncInvertState: false,
|
||||
syncColormap: false,
|
||||
});
|
||||
let ptVoiSynchronizer = createVOISynchronizer('PT_VOI_SYNCHRONIZER_ID', {
|
||||
syncInvertState: false,
|
||||
syncColormap: false,
|
||||
});
|
||||
let fusionVoiSynchronizer = createVOISynchronizer('FUSION_VOI_SYNCHRONIZER_ID', {
|
||||
syncInvertState: false,
|
||||
syncColormap: false,
|
||||
});
|
||||
[
|
||||
`viewport-fusion-0`,
|
||||
`viewport-fusion-1`,
|
||||
`viewport-fusion-2`,
|
||||
].forEach((viewportId) => {
|
||||
axialCameraPositionSynchronizer.add({
|
||||
renderingEngineId: this.renderingEngineId,
|
||||
viewportId,
|
||||
});
|
||||
});
|
||||
[
|
||||
`viewport-fusion-0`,
|
||||
].forEach((viewportId) => {
|
||||
ctVoiSynchronizer.add({
|
||||
renderingEngineId: this.renderingEngineId,
|
||||
viewportId,
|
||||
});
|
||||
});
|
||||
[
|
||||
`viewport-fusion-3`,
|
||||
`viewport-fusion-1`,
|
||||
].forEach((viewportId) => {
|
||||
ptVoiSynchronizer.add({
|
||||
renderingEngineId: this.renderingEngineId,
|
||||
viewportId,
|
||||
});
|
||||
});
|
||||
[
|
||||
`viewport-fusion-2`,
|
||||
].forEach((viewportId) => {
|
||||
fusionVoiSynchronizer.add({
|
||||
renderingEngineId,
|
||||
viewportId,
|
||||
});
|
||||
ctVoiSynchronizer.addTarget({
|
||||
renderingEngineId,
|
||||
viewportId,
|
||||
});
|
||||
ptVoiSynchronizer.addTarget({
|
||||
renderingEngineId,
|
||||
viewportId,
|
||||
});
|
||||
});
|
||||
},
|
||||
setColorMap(rgbPresetName) {
|
||||
let fusionViewportIds = [`viewport-fusion-1`, `viewport-fusion-2`, `viewport-fusion-3`]
|
||||
fusionViewportIds.forEach(id => {
|
||||
|
@ -2648,6 +2714,21 @@ export default {
|
|||
let { ct, pt } = data
|
||||
this.loading = true
|
||||
this.loadingText = this.$t('trials:lugano:message:loadVolumes')
|
||||
if ( this.verifyFusionData(ct, pt) ) {
|
||||
this.loading = false
|
||||
this.loadingText = null
|
||||
this.$refs[`viewport-0`][0].setSeriesInfo(ct)
|
||||
this.$refs[`viewport-1`][0].setSeriesInfo(pt)
|
||||
this.$refs[`viewport-2`][0].setSeriesInfo(pt)
|
||||
this.$refs[`viewport-3`][0].setSeriesInfo(pt)
|
||||
return true
|
||||
}
|
||||
if (!this.fusionSerieId.ct || this.fusionSerieId.ct !== ct.SeriesInstanceUid ) {
|
||||
this.fusionSerieId.ct = ct.SeriesInstanceUid
|
||||
}
|
||||
if (!this.fusionSerieId.pt || this.fusionSerieId.pt !== pt.SeriesInstanceUid ) {
|
||||
this.fusionSerieId.pt = pt.SeriesInstanceUid
|
||||
}
|
||||
await this.getVolume(ct)
|
||||
await this.getVolume(pt)
|
||||
await this.getVolume(pt, true)
|
||||
|
@ -2655,20 +2736,20 @@ export default {
|
|||
this.loadingText = null
|
||||
let ctData = {
|
||||
data: ct,
|
||||
volumeId: this.volumeData[ct.Id].volumeId,
|
||||
volumeId: this.volumeData[ct.SeriesInstanceUid].volumeId,
|
||||
}
|
||||
let ptData = {
|
||||
data: pt,
|
||||
volumeId: this.volumeData[pt.Id].volumeId,
|
||||
volume: this.volumeData[pt.Id].volume,
|
||||
volumeId: this.volumeData[pt.SeriesInstanceUid].volumeId,
|
||||
volume: this.volumeData[pt.SeriesInstanceUid].volume,
|
||||
}
|
||||
let fusionData = {
|
||||
ct,
|
||||
data: pt,
|
||||
volumeId: this.volumeData[pt.Id].volumeId,
|
||||
ctVolumeId: this.volumeData[ct.Id].volumeId,
|
||||
ptVolumeId: this.volumeData[pt.Id].volumeId,
|
||||
fusionVolumeId: this.volumeData[`fusion_${pt.Id}`].volumeId,
|
||||
volumeId: this.volumeData[pt.SeriesInstanceUid].volumeId,
|
||||
ctVolumeId: this.volumeData[ct.SeriesInstanceUid].volumeId,
|
||||
ptVolumeId: this.volumeData[pt.SeriesInstanceUid].volumeId,
|
||||
fusionVolumeId: this.volumeData[`fusion_${pt.SeriesInstanceUid}`].volumeId,
|
||||
}
|
||||
this.$refs[`viewport-0`][0].setSeriesInfo(ct)
|
||||
this.$refs[`viewport-1`][0].setSeriesInfo(pt)
|
||||
|
@ -2688,9 +2769,15 @@ export default {
|
|||
this.loadingText = null
|
||||
}
|
||||
},
|
||||
verifyFusionData(ct, pt) {
|
||||
if (this.fusionSerieId.ct === ct.SeriesInstanceUid && this.fusionSerieId.pt === pt.SeriesInstanceUid && cache.getVolume(this.volumeData[ct.SeriesInstanceUid].volumeId) && cache.getVolume(this.volumeData[pt.SeriesInstanceUid].volumeId) && cache.getVolume(this.volumeData[`fusion_${pt.SeriesInstanceUid}`].volumeId) ) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
async getVolume(serie, isFusion = false ) {
|
||||
let volumeId = null, volume = null
|
||||
let key = isFusion ? `fusion_${serie.Id}` : serie.Id
|
||||
let key = isFusion ? `fusion_${serie.SeriesInstanceUid}` : serie.SeriesInstanceUid
|
||||
if(!this.volumeData[key] || !cache.getVolume(this.volumeData[key].volumeId)) {
|
||||
await this.$refs[`viewport-fusion-0`][0].createImageIdsAndCacheMetaData(serie)
|
||||
volumeId = `${isFusion ? 'fusion' : serie.Modality}Volume` + ':' + csUtils.uuidv4()
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
</template>
|
||||
<script>
|
||||
import ReadPage from './ReadPage'
|
||||
import PetCtReadPage from './PetCtReadPage'
|
||||
import ReportPage from './ReportPage'
|
||||
import CustomizeReportPage from './customize/ReportPage'
|
||||
export default {
|
||||
|
@ -33,7 +32,6 @@ export default {
|
|||
components: {
|
||||
ReadPage,
|
||||
ReportPage,
|
||||
PetCtReadPage,
|
||||
CustomizeReportPage
|
||||
},
|
||||
props: {
|
||||
|
|
Loading…
Reference in New Issue