-
Notifications
You must be signed in to change notification settings - Fork 631
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
Corrupt Multi-frame File - Consistent for all image sizes. #1761
Comments
Sadly I cannot reproduce your issue. Maybe you could post this generated file.
You see, I dot not use Bitmaps or PinnedMemoryBuffers etc, but directly wrote the bytes into the frames. The output (with fo-dicom as well as with MicroDicom) was fine, all frames altered from red to blue. Not a single frame was black. Please also try this code, that I provided. If this method works fine, then the issue likely within your ImageHandler methods. |
@gofal I tried to use the solution from Corrupt Multi-frame File - Consistent for all image sizes. · Issue #1761 · fo-dicom/fo-dicom (github.com), The generated DICOM file still has issue which frame 1001 is blank. For a further investigation, after call pixelData.AddFrame(buffer) (Previously we talked about similar findings but that at the ‘save’ phase not add frame phase)
The detail error information is “Array dimensions exceeded supported range”. So it seems issue happened at add frame, before even called ‘save’ function. But test with 1500 frames and 1 pixel by pixel, as suggest by Corrupt Multi-frame File - Consistent for all image sizes. · Issue #1761 · fo-dicom/fo-dicom (github.com), the count is correct, not overflow since it only has 1500x1x1x3=4500, but the frame 1001 is still blank. Which means that count overflow may not be the direct issue towards it. |
Describe the bug
When attempting to generate a US Multiframe Image, (Using
OtherBytePixelData
) I run into an error where frame 1001 (regardless of image size) is always corrupt. Frames 1000 & 1002 are correctly represented in the DICOM image.To Reproduce
The list of System.Drawing.Bitmap provided to this function is a bitmap of size 1x1, where each bitmap alternates between Red & Blue.
Expected behavior
When opening the generated DICOM File, produced by the above & related code that adds additional tags, all frames should be present, alternating between a Red & Blue background.
Screenshots or test DICOM files
Frame 1000 (even frame numbers are always blue)
Frame 1001 (should be red)
Frame 1002
Environment
Fellow Oak DICOM version:
fo-dicom.core, Version=5.1.2.0
OS: Win 11 Pro Version 22H2 Build 22621.3155
Platform: .NET 6
The text was updated successfully, but these errors were encountered: