Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions packages/dicom/typescript/src/read-image-dicom-file-series.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,17 @@ async function readImageDicomFileSeries(
workerPool = new WorkerPool(numberOfWorkers, readImageDicomFileSeriesWorkerFunction)
}

const inputs: Array<BinaryFile> = [
]
if(options.inputImages.length < 1) {
throw new Error('"input-images" option must have a length > 1')
}

await Promise.all(options.inputImages.map(async (value) => {
const inputs: Array<BinaryFile> = await Promise.all(options.inputImages.map(async (value) => {
let valueFile = value
if (value instanceof File) {
const valueBuffer = await value.arrayBuffer()
valueFile = { path: value.name, data: new Uint8Array(valueBuffer) }
}
inputs.push(valueFile as BinaryFile)
return valueFile as BinaryFile
}))

if (options.singleSortedSeries) {
Expand Down
Loading