Pos: {{ mousePosition.index[0] }}, {{ mousePosition.index[1] }}, {{ mousePosition.index[2] }}
{
const renderingEngine = getRenderingEngine(this.renderingEngineId)
if (renderingEngine) {
@@ -243,7 +244,17 @@ export default {
this.imageInfo.size = `${imagePlaneModule.columns}*${imagePlaneModule.rows}`
this.imageInfo.location = imagePlaneModule.sliceLocation
this.getOrientationMarker()
- this.$emit('renderAnnotations', this.series)
+ // this.$emit('renderAnnotations', this.series)
+ var properties = viewport.getProperties()
+
+ if (properties && properties.voiRange) {
+ var { lower, upper } = properties.voiRange
+ const windowWidth = upper - lower
+ const windowCenter = (upper + lower) / 2
+ this.defaultWindowLevel.windowWidth = windowWidth
+ this.defaultWindowLevel.windowCenter = windowCenter
+ this.imageInfo.wwwc = `${Math.round(windowWidth)}/${Math.round(windowCenter)}`
+ }
// const toolGroupId = `viewport-${this.viewportIndex}`
// const toolGroup = ToolGroupManager.getToolGroup(toolGroupId)
// toolGroup.setToolEnabled('ScaleOverlay')
@@ -295,7 +306,6 @@ export default {
},
resetOrientationMarkers() {
if (this.originalMarkers.length > 0) {
- console.log(this.originalMarkers)
this.orientationMarkers = [...this.originalMarkers]
this.setMarkers()
}
@@ -388,6 +398,18 @@ export default {
// 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
@@ -470,78 +492,64 @@ export default {
imageIds: obj.ImageIds
})
},
- async setSeriesInfo(obj, isLocate = false, option = {}) {
+ async setSeriesInfo(obj, option = {}) {
try {
- if (this.series && obj.Id === this.series.Id && obj.Description === this.series.Description && !isLocate) {
- obj.SliceIndex = this.series.SliceIndex
+ let { data, volumeId } = obj
+ if (this.series && data.Id === this.series.Id && data.Description === this.series.Description) {
+ data.SliceIndex = this.series.SliceIndex
}
+ this.ptVolumeId = null
this.series = {}
- let { isFusion, isMip } = option
+ let { isFusion, isMip, colorMap } = option
this.isFusion = isFusion;
this.isMip = isMip;
const renderingEngine = getRenderingEngine(this.renderingEngineId)
const viewport = renderingEngine.getViewport(this.viewportId)
- viewport.setOrientation(OrientationAxis.AXIAL)
- const toolGroup = ToolGroupManager.getToolGroup(this.viewportId)
- toolGroup.setToolEnabled(MIPJumpToClickTool.toolName)
- toolGroup.setToolEnabled(VolumeRotateTool.toolName)
if (this.isFusion) {
this.$nextTick(() => {
this.renderColorBar(this.presetName)
})
- let { ct, pet } = obj
- this.series = { ...pet }
+ let { ct, data, ctVolumeId, ptVolumeId, fusionVolumeId } = obj
+ this.series = { ...data }
this.ctSeries = { ...ct }
- this.petSeries = { ...pet }
- const maxCount = Math.max(this.ctSeries.ImageIds.length, this.petSeries.ImageIds.length)
- this.$set(this.ctSeries, 'imageMaxLength', maxCount)
- this.$set(this.petSeries, 'imageMaxLength', maxCount)
- await this.createImageIdsAndCacheMetaData(this.ctSeries)
- await this.createImageIdsAndCacheMetaData(this.petSeries)
- let ctVolumeId =
- 'fusion_ct' + ':' + csUtils.uuidv4()
- let ctVolume = await volumeLoader.createAndCacheVolume(ctVolumeId, { imageIds: this.ctSeries.ImageIds })
- this.volumeId =
- 'fusion_ct' + ':' + csUtils.uuidv4()
- let petVolume = await volumeLoader.createAndCacheVolume(this.volumeId, { imageIds: this.petSeries.ImageIds })
- ctVolume.load();
- petVolume.load();
+ this.petSeries = { ...data }
+ // const maxCount = Math.max(this.ctSeries.ImageIds.length, this.petSeries.ImageIds.length)
+ // this.$set(this.ctSeries, 'imageMaxLength', maxCount)
+ // this.$set(this.petSeries, 'imageMaxLength', maxCount)
+ // await this.createImageIdsAndCacheMetaData(this.ctSeries)
+ // await this.createImageIdsAndCacheMetaData(this.petSeries)
+ this.volumeId = ptVolumeId
+ this.ptVolumeId = fusionVolumeId
await viewport
- .setVolumes([{
- volumeId: ctVolumeId, callback: (r) => {
- setCtTransferFunctionForVolumeActor(r)
- console.log("融合ct渲染成功")
+ .setVolumes([
+ {
+ volumeId: this.ptVolumeId, callback: (r) => {
+ setPetColorMapTransferFunctionForVolumeActor(r)
+ console.log("融合pet渲染成功");
+ }
+ },
+ {
+ volumeId: ctVolumeId, callback: (r) => {
+ setCtTransferFunctionForVolumeActor(r)
+ console.log("融合ct渲染成功")
+ }
+ },
+ {
+ volumeId: this.volumeId, callback: (r) => {
+ setPetColorMapTransferFunctionForVolumeActor(r)
+ console.log("融合pet渲染成功");
+ }
+ },
+ ]).then(res => {
+ if (colorMap) {
+ this.setColorMap(this.presetName)
}
- }, {
- volumeId: this.volumeId, callback: (r) => {
- setPetColorMapTransferFunctionForVolumeActor(r)
- console.log("融合pet渲染成功");
- }
- }])
+ })
} else {
- this.series = { ...obj }
- await this.createImageIdsAndCacheMetaData(obj)
- this.volumeId =
- 'volume' + ':' + csUtils.uuidv4()
- let volume = await volumeLoader.createAndCacheVolume(this.volumeId, { imageIds: obj.ImageIds })
-
- volume.load();
+ this.series = { ...data }
+ this.volumeId = volumeId
if (this.isMip) {
- viewport.setOrientation(OrientationAxis.CORONAL);
- toolGroup.setToolActive(VolumeRotateTool.toolName, {
- bindings: [
- {
- mouseButton: MouseBindings.Wheel, // mouse wheel
- },
- ],
- })
- toolGroup.setToolActive(MIPJumpToClickTool.toolName, {
- bindings: [
- {
- mouseButton: MouseBindings.Primary, // Left Click
- },
- ],
- })
+ let { volume } = obj
const ptVolumeDimensions = volume.dimensions;
const slabThickness = Math.sqrt(
ptVolumeDimensions[0] * ptVolumeDimensions[0] +
@@ -552,6 +560,7 @@ export default {
.setVolumes([{
volumeId: this.volumeId,
callback: (r) => {
+ setPetColorMapTransferFunctionForVolumeActor(r)
console.log("mip渲染成功")
},
slabThickness,
@@ -559,23 +568,31 @@ export default {
defaultOptions: {
orientation: OrientationAxis.CORONAL
}
- }])
+ }]).then(res => {
+ if (colorMap) {
+ this.setColorMap(this.presetName)
+ }
+ })
} else {
viewport
.setVolumes([{
volumeId: this.volumeId, callback: (r) => {
+ if (this.series.Modality === 'PT') {
+ setPetColorMapTransferFunctionForVolumeActor(r)
+ } else {
+ setCtTransferFunctionForVolumeActor(r)
+ }
console.log("渲染成功")
}
- }])
+ }]).then(res => {
+ if (colorMap) {
+ this.setColorMap(this.presetName)
+ }
+ })
}
}
viewport.render()
- if (!this.series.cellType) {
- if (this.isFusion) return this.series.cellType = 'FUSION'
- if (this.isMip) return this.series.cellType = 'MIP'
- this.series.cellType = this.series.Modality
- }
} catch (e) {
console.log(e)
}
@@ -660,7 +677,7 @@ export default {
},
handletoolsMouseWheel(e) {
const { viewportId, wheel } = e.detail
- if (this.series.cellType === 'MIP') {
+ if (this.isMip) {
const container = document.getElementById('rotateBar')
const slider = document.getElementById('rotateSlider')
const containerWidth = container.offsetWidth
@@ -922,7 +939,7 @@ export default {
bottom: 5px;
left: 50%;
transform: translateX(-50%);
- background: #fff;
+ background: #333;
z-index: 10;
cursor: pointer;
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
index 766cb4e1..1747f289 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue
@@ -1,5 +1,6 @@
-
+
@@ -42,9 +43,9 @@
@@ -331,8 +340,8 @@
+
+
+
@@ -486,6 +518,10 @@
+
+
+
diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/VisitReview.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/VisitReview.vue
index d8239eb8..e2e22161 100644
--- a/src/views/trials/trials-panel/reading/dicoms3D/components/VisitReview.vue
+++ b/src/views/trials/trials-panel/reading/dicoms3D/components/VisitReview.vue
@@ -3,8 +3,7 @@
-
-
+
+
+
+
+
\ No newline at end of file