feat: 上传全部影像

This commit is contained in:
mozzie 2023-08-30 17:11:44 +08:00
parent 267c5dfa43
commit 43eb5e70af
3 changed files with 10 additions and 6 deletions

View File

@ -12,11 +12,14 @@ export const columnsForStudy: TableColumnsType<Study> = [
{ {
title: "切片数量", title: "切片数量",
key: "seriesNumber", key: "seriesNumber",
render: (_: any, record: Study) => ( render: (_: any, record: Study) => {
console.log(record);
return (
<span> <span>
{record.subs.map((s) => s.subs.length).reduce((p, n) => p + n)} {record.subs.map((s) => s.subs.length).reduce((p, n) => p + n)}
</span> </span>
), );
},
}, },
{ title: "年龄", dataIndex: "patientAge", key: "patientAge" }, { title: "年龄", dataIndex: "patientAge", key: "patientAge" },
{ title: "性别", dataIndex: "patientSex", key: "patientSex" }, { title: "性别", dataIndex: "patientSex", key: "patientSex" },

View File

@ -42,6 +42,7 @@ export const useDicomUploader = () => {
//TODO: 耗时 //TODO: 耗时
setIsLoading(true); setIsLoading(true);
const studys = await parseDcmFiles(dcmFiles); const studys = await parseDcmFiles(dcmFiles);
console.log("studys", studys);
setStudys(studys); setStudys(studys);
setIsLoading(false); setIsLoading(false);
}; };

View File

@ -69,7 +69,7 @@ export const parseDcmFiles = async (dcmFiles: File[]): Promise<Study[]> => {
} }
// 序列级别 // 序列级别
let series = study.subs.find( let series = study.subs.find(
(s) => s.SeriesInstanceUID === SeriesInstanceUID (s) => s.SeriesInstanceUID === SeriesInstanceUID && s.
); );
if (!series) { if (!series) {
series = { series = {