-
Notifications
You must be signed in to change notification settings - Fork 82
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
DICOM Files with Large Number of Frames #493
Comments
Thank you for reporting. You are right that the Fragments API bears a few limitations right now, but apparently it can also be misleading. Creating let mut all_fragments: Vec<_> = frames.iter().enumerate().map(|(ix, frame)| {
println!("Adding frame {} with len {}", ix, frame.len());
frame.to_vec()
}).collect();
file.put(DataElement::new(
tags::PIXEL_DATA,
VR::OB,
PixelSequence::<InMemDicomObject, InMemFragment>(all_fragments.into()),
)); You might encounter two other issues:
|
Ok awesome and good to know. In the example above do you happen to know if I will need to write the pixel data with a different approach as well? On my end it is showing that the From<> trait isn't implemented for converting a Vec<Vec> into a PixelSequence.
|
Hmm right. You can try file.put(DataElement::new(
tags::PIXEL_DATA,
VR::OB,
PixelFragmentSequence::new_fragments(all_fragments.into()),
)); |
This worked. Thanks so much and the library is great. |
Hello,
We were wondering if there is any way to create DICOM files with large numbers of frames? We are trying to create DICOM files for digital pathology and noticed if they have a large number of frames (30,000+) then this line panics. This specific code is creating 32,000 JPEG2000 frames.
Do you know if there are any potential workarounds to creating these files? At a rough glance it looked like it might be coming from the offset table which is u32 and capped to roughly 4 billion in length and were curious if potentially it could be u64?
https://doc.rust-lang.org/std/u32/constant.MAX.html
Message:
The text was updated successfully, but these errors were encountered: