Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
9500842628
|
|
@ -432,3 +432,19 @@ export function studyUndoMaskImage(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取分割组历史版本
|
||||||
|
export function getSegmentationVersionList(data) {
|
||||||
|
return request({
|
||||||
|
url: `/Segmentation/getSegmentationVersionList`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 恢复分割历史版本
|
||||||
|
export function restoreSegmentationVersion(data) {
|
||||||
|
return request({
|
||||||
|
url: `/Segmentation/restoreSegmentationVersion`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -4467,3 +4467,10 @@ export function updateReadModuleClinicalData(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getTrialUnreadVisitList(trialId) {
|
||||||
|
return request({
|
||||||
|
url: `/DownloadAndUpload/getTrialUnreadVisitList?trialId=${trialId}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -50,11 +50,11 @@ export const constantRoutes = [
|
||||||
component: () => import('@/views/login/index'),
|
component: () => import('@/views/login/index'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: '/test',
|
path: '/test',
|
||||||
// component: () => import('@/views/test/index'),
|
component: () => import('@/views/test/index'),
|
||||||
// hidden: true
|
hidden: true
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
path: '/resetpassword',
|
path: '/resetpassword',
|
||||||
component: () => import('@/views/forgetpassword/index'),
|
component: () => import('@/views/forgetpassword/index'),
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,136 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!-- <label>行数: </label>
|
<el-input v-model="input" placeholder="" clearable></el-input>
|
||||||
<input v-model.number="rows" type="number" min="1" max="3" />
|
<el-button type="primary" size="small" :disabled="!input" @click.stop="getTrialUnreadVisitList">下载</el-button>
|
||||||
<label>列数: </label>
|
|
||||||
<input v-model.number="cols" type="number" min="1" max="3" /> -->
|
|
||||||
<GridLayout :rows="rows" :cols="cols" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import GridLayout from './GridLayout.vue';
|
import { downLoadFile } from '@/utils/stream.js'
|
||||||
|
import { getTrialUnreadVisitList, getExportSubjectVisitImageList } from '@/api/trials'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
// components: {
|
||||||
GridLayout,
|
// GridLayout,
|
||||||
},
|
// },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
rows: 2,
|
input: '08deab4a-f842-a7a4-0242-0a0001000000'
|
||||||
cols: 2,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
async getTrialUnreadVisitList() {
|
||||||
|
let res = await getTrialUnreadVisitList(this.input)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
let arr = res.Result
|
||||||
|
this.LoopDownload(arr, 0)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async LoopDownload(arr, index) {
|
||||||
|
if (index >= arr.length) return false
|
||||||
|
let res = await this.handleExportImage(false, true, arr[index])
|
||||||
|
console.log(res, arr[index], 'res')
|
||||||
|
index++
|
||||||
|
this.LoopDownload(arr, index)
|
||||||
|
},
|
||||||
|
async handleExportImage(IsKeyImage = false, IsExportReading = false, SubjectVisitId) {
|
||||||
|
try {
|
||||||
|
let data = {
|
||||||
|
TrialId: this.input,
|
||||||
|
IsKeyImage,
|
||||||
|
IsExportReading
|
||||||
|
}
|
||||||
|
data.SubjectVisitIdList = [SubjectVisitId]
|
||||||
|
// if (!IsKeyImage) {
|
||||||
|
// let confirm = await this.$confirm(this.$t('trials:imageSummary:confirm:space').replace('xxx', this.image_size.CheckImageSize))
|
||||||
|
// if (!confirm) return false
|
||||||
|
// }
|
||||||
|
let res = await getExportSubjectVisitImageList(data)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
return this.downLoad(IsKeyImage, res.Result, IsExportReading)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
} catch (err) {
|
||||||
|
return false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 下载
|
||||||
|
async downLoad(IsKeyImage = false, row, IsExportReading = false) {
|
||||||
|
try {
|
||||||
|
let { files, name } = this.formatDownloadFile(IsKeyImage, row, IsExportReading)
|
||||||
|
return await downLoadFile(files, name, 'zip')
|
||||||
|
// }
|
||||||
|
} catch (err) {
|
||||||
|
return false
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 格式化下载文件路径
|
||||||
|
formatDownloadFile(IsKeyImage = false, row, IsExportReading = false) {
|
||||||
|
let files = [],
|
||||||
|
name = `${this.$route.query.researchProgramNo}_${this.$t('trials:imageSummary:downloadname:dicom')}_${Date.now()}.zip`;
|
||||||
|
if (IsExportReading) {
|
||||||
|
name = `${row.VisitList[0].SubjectCode}_${row.VisitList[0].VisitName}.zip`;
|
||||||
|
}
|
||||||
|
if (!IsKeyImage) {
|
||||||
|
//中心ID/受试者ID/访视名/Study ID_Study Date_Modality/文件
|
||||||
|
row.VisitList.forEach(visit => {
|
||||||
|
if (visit.StudyList && visit.StudyList.length > 0) {
|
||||||
|
visit.StudyList.forEach(study => {
|
||||||
|
let arr = []
|
||||||
|
study.SeriesList.forEach(item => {
|
||||||
|
if (!arr.includes(item.Modality)) {
|
||||||
|
arr.push(item.Modality)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let str = arr.join('_')
|
||||||
|
let time = study.StudyTime.split(' ')[0]
|
||||||
|
if (study.StudyDIRPath && !study.dirHas) {
|
||||||
|
study.dirHas = true
|
||||||
|
let obj = {
|
||||||
|
name: `${study.StudyCode}_${time}_${str}/DICOMDIR`,
|
||||||
|
url: this.OSSclientConfig.basePath + study.StudyDIRPath,
|
||||||
|
}
|
||||||
|
files.push(obj)
|
||||||
|
}
|
||||||
|
if (study.SeriesList && study.SeriesList.length > 0) {
|
||||||
|
study.SeriesList.forEach(serie => {
|
||||||
|
|
||||||
|
if (serie.InstanceList && serie.InstanceList.length > 0) {
|
||||||
|
serie.InstanceList.forEach(instance => {
|
||||||
|
let instanceArr = instance.Path.split("/")
|
||||||
|
let fileName = instance.FileName || instanceArr[instanceArr.length - 1]
|
||||||
|
let obj = {
|
||||||
|
name: `${study.StudyCode}_${time}_${str}/IMAGE/${fileName}`,
|
||||||
|
url: this.OSSclientConfig.basePath + instance.Path,
|
||||||
|
IsEncapsulated: instance.IsEncapsulated
|
||||||
|
}
|
||||||
|
files.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (visit.NoneDicomStudyList && visit.NoneDicomStudyList.length > 0) {
|
||||||
|
visit.NoneDicomStudyList.forEach(noneDicomStudy => {
|
||||||
|
if (noneDicomStudy.FileList && noneDicomStudy.FileList.length > 0) {
|
||||||
|
noneDicomStudy.FileList.forEach(file => {
|
||||||
|
let time = noneDicomStudy.ImageDate.split(' ')[0]
|
||||||
|
let obj = {
|
||||||
|
name: `${visit.TrialSiteCode}/${visit.SubjectCode}/${visit.VisitName}/${noneDicomStudy.StudyCode}_${time}_${noneDicomStudy.Modality}/${file.FileName}`,
|
||||||
|
url: this.OSSclientConfig.basePath + file.Path,
|
||||||
|
}
|
||||||
|
files.push(obj)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return { files, name }
|
||||||
|
},
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -145,6 +145,9 @@
|
||||||
<div class="SegmentGroupBtn" @click.stop="exportSegmentGroup">
|
<div class="SegmentGroupBtn" @click.stop="exportSegmentGroup">
|
||||||
{{ $t('trials:reading:Segmentations:button:exportSegmentGroup') }}
|
{{ $t('trials:reading:Segmentations:button:exportSegmentGroup') }}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="SegmentGroupBtn" @click.stop="recoverySegmentGroup">
|
||||||
|
{{ $t('trials:reading:Segmentations:button:recoverySegmentGroup') }}
|
||||||
|
</div>
|
||||||
<div class="SegmentGroupBtn" @click.stop="delSegmentGroup">
|
<div class="SegmentGroupBtn" @click.stop="delSegmentGroup">
|
||||||
{{ $t('trials:reading:Segmentations:button:deleteSegmentGroup') }}
|
{{ $t('trials:reading:Segmentations:button:deleteSegmentGroup') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -228,9 +231,10 @@
|
||||||
<span>{{ k }}</span>
|
<span>{{ k }}</span>
|
||||||
<span v-if="item.stats[k]">{{ JSON.stringify(item.stats[k].value) !== 'null'
|
<span v-if="item.stats[k]">{{ JSON.stringify(item.stats[k].value) !== 'null'
|
||||||
?
|
?
|
||||||
k === 'count' ? Number(item.stats[k].value).toFixed(0) : Number(item.stats[k].value).toFixed(digitPlaces)
|
k === 'count' ? Number(item.stats[k].value).toFixed(0) :
|
||||||
|
Number(item.stats[k].value).toFixed(digitPlaces)
|
||||||
: null
|
: null
|
||||||
}}<i>{{ item.stats[k].unit }}</i></span>
|
}}<i>{{ item.stats[k].unit }}</i></span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="serialNum" slot="reference">{{ index + 1 }}</div>
|
<div class="serialNum" slot="reference">{{ index + 1 }}</div>
|
||||||
|
|
@ -278,10 +282,37 @@
|
||||||
{{ $t("trials:reading:Segmentations:button:saveAll") }}
|
{{ $t("trials:reading:Segmentations:button:saveAll") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<el-dialog :visible.sync="visible" :close-on-click-modal="false"
|
||||||
|
:title="$t('trials:reading:Segmentations:recovery')" width="850px">
|
||||||
|
<el-table :data="recoveryList" style="width: 100%;background-color: #1e1e1e;">
|
||||||
|
<el-table-column type="index" width="50">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="Version" :label="$t('trials:reading:Segmentations:table:Version')">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="FileSize" :label="$t('trials:reading:Segmentations:table:FileSize')">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ fileSizeFormatter(scope.row.FileSize) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column property="CreateTime" :label="$t('trials:reading:Segmentations:table:CreateTime')">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('common:action:action')" align="left" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="text" @click.stop="restoreSegmentationVersion(scope.row)">{{
|
||||||
|
$t('trials:reading:Segmentations:button:recovery')
|
||||||
|
}}</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 分页组件 -->
|
||||||
|
<pagination style="text-align: right;margin-top: 5px;" class="page" :total="total"
|
||||||
|
:page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize"
|
||||||
|
@pagination="getSegmentationVersionList(segmentationId)" />
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { changeSegmentationSavedStatus, getSegmentationList, addOrUpdateSegmentation, deleteSegmentation, getSegmentList, addOrUpdateSegment, deleteSegment, getSegmentBindingList, saveSegmentBindingAndAnswer, getReadingTableQuestionTrialById, getReadingQuestionTrialById, lockOrUnLockSegment } from '@/api/reading'
|
import { changeSegmentationSavedStatus, getSegmentationList, addOrUpdateSegmentation, deleteSegmentation, getSegmentList, addOrUpdateSegment, deleteSegment, getSegmentBindingList, saveSegmentBindingAndAnswer, getReadingTableQuestionTrialById, getReadingQuestionTrialById, lockOrUnLockSegment, restoreSegmentationVersion, getSegmentationVersionList } from '@/api/reading'
|
||||||
import * as cornerstoneTools from '@cornerstonejs/tools';
|
import * as cornerstoneTools from '@cornerstonejs/tools';
|
||||||
import * as cornerstone from "@cornerstonejs/core";
|
import * as cornerstone from "@cornerstonejs/core";
|
||||||
import dcmjs from '@/utils/dcmUpload/dcmjs'
|
import dcmjs from '@/utils/dcmUpload/dcmjs'
|
||||||
|
|
@ -290,6 +321,7 @@ import cornerstoneDICOMImageLoader from '@cornerstonejs/dicom-image-loader'
|
||||||
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
|
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
|
||||||
import { getCustomizeStandardsSegmentDicomTools } from './toolConfig'
|
import { getCustomizeStandardsSegmentDicomTools } from './toolConfig'
|
||||||
import * as polySeg from '@cornerstonejs/polymorphic-segmentation'
|
import * as polySeg from '@cornerstonejs/polymorphic-segmentation'
|
||||||
|
import Pagination from '@/components/Pagination'
|
||||||
cornerstoneTools.init({ addons: { polySeg } })
|
cornerstoneTools.init({ addons: { polySeg } })
|
||||||
const {
|
const {
|
||||||
ToolGroupManager,
|
ToolGroupManager,
|
||||||
|
|
@ -307,8 +339,20 @@ const { segmentation: segmentationUtils } = CStUtils;
|
||||||
const { cache, getRenderingEngine, imageLoader, eventTarget, metaData, utilities: csUtils, volumeLoader } = cornerstone;
|
const { cache, getRenderingEngine, imageLoader, eventTarget, metaData, utilities: csUtils, volumeLoader } = cornerstone;
|
||||||
// const { downloadDICOMData } = cornerstoneAdapters.helpers;
|
// const { downloadDICOMData } = cornerstoneAdapters.helpers;
|
||||||
const { Cornerstone3D } = cornerstoneAdapters.adaptersSEG;
|
const { Cornerstone3D } = cornerstoneAdapters.adaptersSEG;
|
||||||
|
const searchDataDefault = () => {
|
||||||
|
return {
|
||||||
|
SegmentationId: null,
|
||||||
|
PageIndex: 1,
|
||||||
|
PageSize: 20,
|
||||||
|
Asc: false,
|
||||||
|
SortField: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
name: "Segmentations",
|
name: "Segmentations",
|
||||||
|
components: {
|
||||||
|
Pagination,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
isMPR: {
|
isMPR: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -387,6 +431,10 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
visible: false,
|
||||||
|
recoveryList: [],
|
||||||
|
searchData: searchDataDefault(),
|
||||||
|
total: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
series: {},
|
series: {},
|
||||||
activeNames: ['tools', 'Segment'],
|
activeNames: ['tools', 'Segment'],
|
||||||
|
|
@ -518,6 +566,10 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
fileSizeFormatter(size) {
|
||||||
|
if (!size) return
|
||||||
|
return (size / Math.pow(1024, 2)).toFixed(3) + 'MB'
|
||||||
|
},
|
||||||
showSurface(item) {
|
showSurface(item) {
|
||||||
this.$emit("showSurface", {
|
this.$emit("showSurface", {
|
||||||
segmentationId: item.segmentationId,
|
segmentationId: item.segmentationId,
|
||||||
|
|
@ -742,6 +794,59 @@ export default {
|
||||||
}
|
}
|
||||||
// this.resetViewport()
|
// this.resetViewport()
|
||||||
},
|
},
|
||||||
|
async restoreSegmentationVersion(row) {
|
||||||
|
try {
|
||||||
|
let confirm = await this.$confirm(this.$t('trials:reading:Segmentations:confirm:CurrentDataIsLoss'))
|
||||||
|
if (!confirm) return false
|
||||||
|
let data = {
|
||||||
|
SegmentationId: this.segmentationId,
|
||||||
|
VersionId: row.Id
|
||||||
|
}
|
||||||
|
let res = await restoreSegmentationVersion(data)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
segmentation.removeSegmentation(this.segmentationId)
|
||||||
|
segmentation.state.removeSegmentation(this.segmentationId)
|
||||||
|
let volume = cache.getVolume(this.segmentationId)
|
||||||
|
// 1. 销毁 Volume 实例
|
||||||
|
volume.destroy();
|
||||||
|
// 2. 从缓存中移除
|
||||||
|
volume.removeFromCache();
|
||||||
|
cache.removeImageLoadObject(`wadouri:${this.OSSclientConfig.basePath}${this.curSegmentGroup.segUrl}`)
|
||||||
|
this.getSegmentation(this.segmentationId)
|
||||||
|
DicomEvent.$emit('renderSegmentationBychangeSegmention')
|
||||||
|
this.visible = false
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getSegmentationVersionList(segmentationId) {
|
||||||
|
try {
|
||||||
|
this.searchData.SegmentationId = segmentationId || this.segmentationId
|
||||||
|
let res = await getSegmentationVersionList(this.searchData)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.recoveryList = res.Result.CurrentPageData
|
||||||
|
// this.visible = true
|
||||||
|
this.total = res.Result.TotalCount
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async recoverySegmentGroup() {
|
||||||
|
try {
|
||||||
|
let res = await this.getSegmentationVersionList(this.segmentationId)
|
||||||
|
if (!res) return this.$message.warning(this.$t("trials:reading:Segmentations:message:getSegmentationVersionFail"))
|
||||||
|
this.visible = true
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
selectSegmentGroup(s) {
|
selectSegmentGroup(s) {
|
||||||
// segmentation.activeSegmentation.setActiveSegmentation(`${this.viewportKey}-${this.activeViewportIndex}`, this.segmentationId)
|
// segmentation.activeSegmentation.setActiveSegmentation(`${this.viewportKey}-${this.activeViewportIndex}`, this.segmentationId)
|
||||||
this.$emit('setToolsPassive')
|
this.$emit('setToolsPassive')
|
||||||
|
|
@ -1558,6 +1663,7 @@ export default {
|
||||||
segmentGroup.segUrl = this.$getObjectName(result.url)
|
segmentGroup.segUrl = this.$getObjectName(result.url)
|
||||||
DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: true })
|
DicomEvent.$emit("IsBeSegment", { StudyId: this.series.StudyId, Id: this.series.Id, IsBeSegment: true })
|
||||||
} else {
|
} else {
|
||||||
|
blob = { size: 0 }
|
||||||
segmentGroup.segUrl = null
|
segmentGroup.segUrl = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1688,7 +1794,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 新增或修改分割组
|
// 新增或修改分割组
|
||||||
async addOrUpdateSegmentation(item) {
|
async addOrUpdateSegmentation(item) {
|
||||||
let { name, id, url } = item
|
let { name, id, url, size } = item
|
||||||
try {
|
try {
|
||||||
let data = {
|
let data = {
|
||||||
SegmentationName: name,
|
SegmentationName: name,
|
||||||
|
|
@ -1701,6 +1807,7 @@ export default {
|
||||||
}
|
}
|
||||||
if (url) data.SegUrl = url;
|
if (url) data.SegUrl = url;
|
||||||
if (id) data.Id = id;
|
if (id) data.Id = id;
|
||||||
|
if (size) data.FileSize = size;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
let res = await addOrUpdateSegmentation(data);
|
let res = await addOrUpdateSegmentation(data);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
@ -1712,8 +1819,64 @@ export default {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getSegmentation(segmentationId) {
|
||||||
|
try {
|
||||||
|
this.$emit('setToolsPassive')
|
||||||
|
let data = {
|
||||||
|
SeriesId: this.series.Id,
|
||||||
|
VisitTaskId: this.series.TaskInfo.VisitTaskId,
|
||||||
|
PageSize: 9999,
|
||||||
|
PageIndex: 1,
|
||||||
|
}
|
||||||
|
this.loading = true;
|
||||||
|
let res = await getSegmentationList(data);
|
||||||
|
this.loading = false;
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
// this.segmentList = []
|
||||||
|
// this.segmentationId = null;
|
||||||
|
// this.segmentIndex = null;
|
||||||
|
let list = res.Result.CurrentPageData;
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
let item = list[i]
|
||||||
|
if (item.Id !== segmentationId) continue;
|
||||||
|
let obj = this.segmentList.find(i => i.segmentationId === item.Id)
|
||||||
|
if (!obj) continue;
|
||||||
|
obj.name = item.SegmentationName;
|
||||||
|
obj.segUrl = item.SEGUrl;
|
||||||
|
obj.isSaved = item.IsSaved;
|
||||||
|
obj.segmentationId = item.Id;
|
||||||
|
obj.segments = []
|
||||||
|
if (!this.segmentationId) {
|
||||||
|
this.segmentationId = obj.segmentationId
|
||||||
|
}
|
||||||
|
let segments = await this.getSegmentList(item.Id)
|
||||||
|
segments.forEach((s, index) => {
|
||||||
|
let SegmentJson = s.SegmentJson ? JSON.parse(s.SegmentJson) : {};
|
||||||
|
let o = {
|
||||||
|
segmentIndex: s.SegmentNumber,
|
||||||
|
segmentationId: s.SegmentationId,
|
||||||
|
SegmentLabel: s.SegmentName,
|
||||||
|
color: s.ColorRgb,
|
||||||
|
stats: SegmentJson.stats,
|
||||||
|
bidirectional: SegmentJson.bidirectional,
|
||||||
|
bidirectionalView: true,
|
||||||
|
view: true,
|
||||||
|
lock: s.IsLock,
|
||||||
|
id: s.Id
|
||||||
|
}
|
||||||
|
obj.segments.push(o)
|
||||||
|
|
||||||
|
})
|
||||||
|
this.segmentIndex = obj.segments[0].segmentIndex
|
||||||
|
}
|
||||||
|
this.isloaded = false
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取分割组
|
// 获取分割组
|
||||||
async getSegmentationList(SEGMENT = null) {
|
async getSegmentationList() {
|
||||||
try {
|
try {
|
||||||
this.$emit('setToolsPassive')
|
this.$emit('setToolsPassive')
|
||||||
let data = {
|
let data = {
|
||||||
|
|
@ -1998,6 +2161,21 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-table th.el-table__cell {
|
||||||
|
background-color: #1e1e1e;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-table tr {
|
||||||
|
background-color: #1e1e1e;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .hover-row>td.el-table__cell {
|
||||||
|
background-color: #1e1e1e !important;
|
||||||
|
// opacity: 0.5;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.Segmentations {
|
.Segmentations {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
||||||
|
|
@ -59,10 +59,10 @@
|
||||||
<div v-if="series" class="right-bottom-text">
|
<div v-if="series" class="right-bottom-text">
|
||||||
<div v-show="imageInfo.location">Location: {{
|
<div v-show="imageInfo.location">Location: {{
|
||||||
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.location).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
<div v-show="imageInfo.sliceThickness">Slice Thickness: {{
|
||||||
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
`${Number(imageInfo.sliceThickness).toFixed(digitPlaces)} mm`
|
||||||
}}</div>
|
}}</div>
|
||||||
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
<div v-show="imageInfo.wwwc">WW/WL: {{ imageInfo.wwwc }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="orientation-top">
|
<div class="orientation-top">
|
||||||
|
|
@ -242,6 +242,10 @@ export default {
|
||||||
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||||
resetViewport(this.viewportId)
|
resetViewport(this.viewportId)
|
||||||
})
|
})
|
||||||
|
DicomEvent.$on('renderSegmentationBychangeSegmention', async () => {
|
||||||
|
if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.TaskInfo.VisitTaskId !== this.series.TaskInfo.VisitTaskId) return false
|
||||||
|
await renderSegmentation(this.series, this.series.TaskInfo, this.viewportId, this.SegmentConfig, this.renderingEngineId, null, this.actionConfiguration, this.segmentationId, this.segmentIndex)
|
||||||
|
})
|
||||||
DicomEvent.$on('renderSegmentation', async (viewportId) => {
|
DicomEvent.$on('renderSegmentation', async (viewportId) => {
|
||||||
// if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
// if (this.curSegSeries.Id !== this.series.Id || this.curSegSeries.VisitTaskId !== this.series.VisitTaskId) return false
|
||||||
if (this.viewportId !== viewportId) return false
|
if (this.viewportId !== viewportId) return false
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ async function readSegmentation(obj, series, segmentationId, isFile = false) {
|
||||||
const imageIdObj = await cornerstoneDICOMImageLoader.wadouri.loadImage(`wadouri:${Vue.prototype.OSSclientConfig.basePath}${obj}`).promise
|
const imageIdObj = await cornerstoneDICOMImageLoader.wadouri.loadImage(`wadouri:${Vue.prototype.OSSclientConfig.basePath}${obj}`).promise
|
||||||
imageId = imageIdObj.imageId
|
imageId = imageIdObj.imageId
|
||||||
}
|
}
|
||||||
|
console.log(imageId, 'imageId')
|
||||||
const image = await imageLoader.loadAndCacheImage(imageId);
|
const image = await imageLoader.loadAndCacheImage(imageId);
|
||||||
|
|
||||||
if (!image) {
|
if (!image) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue