Skip to content

Provide a readImageDICOMArrayBufferSeries #480

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

Closed
FezVrasta opened this issue Feb 9, 2022 · 5 comments
Closed

Provide a readImageDICOMArrayBufferSeries #480

FezVrasta opened this issue Feb 9, 2022 · 5 comments

Comments

@FezVrasta
Copy link
Collaborator

FezVrasta commented Feb 9, 2022

Our pipeline looks like the following:

  1. fetch a .tar file containing several DICOM files
  2. untar the DICOM files with js-untar
  3. pipe each of them into a File instance
  4. pass the list of Files to readImageDICOMFileSeries

It'd be extremely useful if itk-wasm exposed a function similar to readImageDICOMFileSeries but that accepts a list of ArrayBuffers, since that's what we already receive from js-untar, this way the logic would look like this:

  1. fetch a .tar file containing several DICOM files
  2. untar the DICOM files with js-untar
  3. pass the list of ArrayBuffers to readImageDICOMArrayBufferSeries

The process that creates the "fake" File instances can take a lot of time (400ms on a ~300 DICOMs list)

Is there any technical reason that prevents this from being added?

Thanks!

@thewtex
Copy link
Member

thewtex commented Feb 10, 2022

Hi @FezVrasta ,

Yes, a readImageDICOMArrayBufferSeries could be created, where readImageDICOMFileSeries is refactored to call this function, similar to how readImageArrayBuffer / readImageFile works -- I'll add this.

@thewtex
Copy link
Member

thewtex commented Feb 11, 2022

@FezVrasta added in #482

@FezVrasta
Copy link
Collaborator Author

I tested it locally and it seems to work, thanks!

Do you think you could do the same for readDICOMTags? I see a lot of calls to readAsArrayBuffer that should be unnecessary given I already have the arrayBuffers available.

@thewtex
Copy link
Member

thewtex commented Feb 18, 2022

@FezVrasta excellent!

Yes, will-do for readDICOMTags.

@thewtex
Copy link
Member

thewtex commented Feb 25, 2022

Done in #492

@thewtex thewtex closed this as completed Mar 4, 2022
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