diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue index 6e5c2cd8..dd7ce476 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/MPRViewport.vue @@ -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 diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/PetCtViewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/PetCtViewport.vue index 3a268fe5..ab408feb 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/PetCtViewport.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/PetCtViewport.vue @@ -531,7 +531,7 @@ export default { } finally { this.loading = false } - }, + }, getFusionVolumes() { const ctVolumeId = this.ctSeries?.SeriesInstanceUid const ptFusionVolumeId = this.ptVolumeId 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 6e31351a..99f27846 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/ReadPage.vue @@ -1603,7 +1603,7 @@ export default { renderAnnotations(series) { if (series.SeriesInstanceUid) { let volume = cache.getVolume(series.SeriesInstanceUid) - console.log(volume.metadata.FrameOfReferenceUID); + // console.log(volume.metadata.FrameOfReferenceUID); } const taskId = series.TaskInfo ? series.TaskInfo.VisitTaskId : null @@ -3702,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 }) }) }, diff --git a/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue b/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue index 5236d58c..635eb876 100644 --- a/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue +++ b/src/views/trials/trials-panel/reading/dicoms3D/components/VolumeViewport.vue @@ -480,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;