-
Hi there, I'm trying to help someone using vips-ffm lopcode/vips-ffm#158 (comment) - they're attempting to load a DICOM image via the streaming API, having gotten a bag of bytes from a second processing library called dcm4che, and they're bumping in to an error:
I'm not sure what the right help might be. Looking through the 8.15 changelogs, it seems like libvips has had native support from that version? As a sense check I was thinking of suggesting running |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Hi @lopcode, Right now, libvips loads DICOM via ImageMagick, and IM doesn't support streaming. There's an issue to add In the meantime, I would load to a memory area and call Some DICOM variants (WG26 for example) are split into many files, so streaming won't work for them, I expect your user knows. Large DICOMs are usually tiled, so even single-file streaming would not work, you'd need to load the whole DICOM file into memory. I made libdicom a few years ago: https://github.com/ImagingDataCommons/libdicom It's small, fast, no-dependency DICOM parser in C, so another approach would be to integrate that in libvips. That would be a lot more work though! |
Beta Was this translation helpful? Give feedback.
-
Ah I just read the issue, it sounds like they have DICOM decoding done already. I think (I think!) they just need The unavoidable copy operation is a shame. |
Beta Was this translation helpful? Give feedback.
-
magickload (and therefore DICOM) just got a source loader: It will buffer to memory and then load from that. |
Beta Was this translation helpful? Give feedback.
magickload (and therefore DICOM) just got a source loader:
#4592
It will buffer to memory and then load from that.