Skip to content
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

RenderImage(int frame) is creating jpeg that does not match original #1617

Open
colebabiuchsenior opened this issue Jun 26, 2023 · 2 comments
Labels

Comments

@colebabiuchsenior
Copy link

Describe the bug
The rendered image from the DICOM image does not match how the study looks on the US machine

Here is a screen shot from the machine:
Screenshot 2023-06-26 114611

Here is how it looks when we convert the DICOM image:
frame_000

To Reproduce
We create a FellowOaksDicom.Imaging.DicomImage and then call RenderImage() with a frame number.
We then use AsSharpImage in order to save it into a stream:
var myImg = dicomImage.RenderImage(frame); var image = myImg.AsSharpImage(); using (var fs = new FileStream(localPath, FileMode.OpenOrCreate)) { image.Save(fs, new JpegEncoder()); }

Expected behavior
The jpeg file should look like the screen shot

Screenshots or test DICOM files
This is the only sample image I have that is less than 25MB zipped.
1_5_20230621211552425US.zip

I have additional files from this study that are similarly distorted, but they are too large to upload using this submittal process.

Environment
Fellow Oak DICOM version: 5.1.1
fo-dicom.Codecs version: 5.10.7
fo-dicom.Imaging.ImageSharp version: 5.1.0
OS: Windows 11 / Linux
Platform: .NET Standard 2.0

@gofal
Copy link
Contributor

gofal commented Jul 11, 2023

This is some JpegLossless encoded image. I tried this file in serveral viewers. Siemens Syngo and Orthang displayed the file correctly, while others like mDicom, Synedra, ClearCanvas etc refused to open the image at all. I guess that something in this file is not standard (I assume photometric interpretation or so). I will try to look into it, but maybe we have to move it to the codec repository.

@colebabiuchsenior
Copy link
Author

Great thanks for looking into this. Let me know if you want additional samples

@gofal gofal added wontfix and removed new labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants