Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yangsongtao1 opened this issue Oct 18, 2024 · 1 comment
Open

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

yangsongtao1 opened this issue Oct 18, 2024 · 1 comment

Comments

@yangsongtao1
Copy link

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
Copy link
Member

thewtex commented Oct 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants