InsightSoftwareConsortium / ITK-Wasm

High performance spatial analysis in a web browser and across programming languages and hardware architectures
https://wasm.itk.org
Apache License 2.0
199 stars 52 forks source link

vue3 use @itk-wasm/dicom get dicom file info error #1257

Open yangsongtao1 opened 1 month ago

yangsongtao1 commented 1 month ago

readImageDicomFileSeries.then() 、catch or finally not inter

code: `import { imageNames } from "@/constant/testFileList" import { readImageDicomFileSeries } from "@itk-wasm/dicom"; import axios from 'axios'

const BASE_URL = 'http://192.168.1.112:8086'

const assembleDcmUrl = (dcmUrl: string) => { return ${BASE_URL}/${dcmUrl} }

const getImageIds = (dcmUrlList: Array) => { return dcmUrlList.map((item) => { return assembleDcmUrl(item) }) }

Promise.all(getImageIds(imageNames).map((imageUrl: string) => { return axios.get(imageUrl, { responseType: 'arraybuffer' }) })).then(result => { const fileList = result.map((resultItem, index) => { return new File([resultItem.data], ${index}.dcm) }) readImageDicomFileSeries({ inputImages: fileList }).then(result => { console.log(result) }).catch(error => { console.log(error) }).finally(() => { console.log('finally') }) })`

thewtex commented 1 month ago

I am not sure what the error being received is here.