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

Unsupported Transfer Syntax Error for Lossy JPEG 8 Bit Image Compression in fo-dicom on .NET 7.0 #1667

Closed
jamesnet214 opened this issue Oct 19, 2023 · 2 comments
Labels

Comments

@jamesnet214
Copy link

Certainly! Here's a more detailed bug report:


Describe the bug
When trying to convert a DICOM image to bitmap using the fo-dicom library, I encounter an error stating "Decoding dataset with transfer syntax: JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression is not supported." This issue does not appear when using the externally provided dicom.Core.dll for .NET Framework 4.81.

To Reproduce

  1. Clone the repository: https://github.com/jamesnet214/issue
  2. Navigate to the DicomTestViewer project.
  3. Run the application and try to load the DICOM file from the specified location.
  4. Observe the error on line 108 in Class1.cs when calling the image.AsSharpImage(); method.

Expected behavior
The DICOM image should be successfully converted to a bitmap without any codec errors.

Screenshots or test DICOM files
The error screenshot can be viewed here:
image

Code for reference:
https://github.com/jamesnet214/issue/blob/main/dotnet/dicom/DicomTestViewer/JamesCoreViewer/Class1.cs

Test DICOM file:
https://github.com/jamesnet214/issue/blob/main/dotnet/dicom/DicomTestViewer/JamesCoreViewer/Data/studylist/A2C/1.dcm

Additional context
The functionality works as expected when using dicom.Core.dll for .NET Framework 4.81, suggesting there might be a compatibility or implementation issue with the fo-dicom library in .NET 7.0.

Environment

  • Fellow Oak DICOM version: 5.1.1
  • OS: Windows 11
  • Platform: .NET 7.0

I hope this expanded description helps. If there's anything else you'd like to add or if you have further questions, please let me know!

@cocosip
Copy link

cocosip commented Dec 8, 2023

You are missing the injection of NativeTranscoderManager

... 
services
    .AddFellowOakDicom()
    .AddTranscoderManager<NativeTranscoderManager>()
    .AddImageManager<ImageSharpImageManager>();

@amoerie
Copy link
Collaborator

amoerie commented Dec 9, 2023

Looks like ChatGPT didn't realize those were needed. 🙃

@gofal gofal added question and removed new labels Dec 21, 2023
@gofal gofal closed this as completed 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

4 participants