Render JPEG 2000 Image Compression Dicom with Fo-Dicom

天大地大妈咪最大 提交于 2020-07-20 04:36:24

问题


I'm try to create a simple WinForms viewer to show DICOM files generated in a NOVARAD pacs system. I'm using the following code from their GitHub page:

var image = new DicomImage(@"C:\myDicom.dcm");                        
image.RenderImage().AsClonedBitmap().Save(@"test.jpg");
Process.Start("test.jpg");

When I run the code I get the following error:

Dicom.Imaging.Codec.DicomCodecException: 'Decoding dataset with transfer syntax: JPEG 2000 Image Compression (Lossless Only) is not supported.'

I'm assuming I need to decompress from the JPEG 2000. Can this not be done with fi-dicom ?

I was trying to play around with GDCM library but I couldn't find the C# wrapper, and noticed several comments saying they rolled it into fo-dicom.

Any suggestions ?

Thanks


回答1:


In .NET Framework applications, the build architecture needs to be set to x86 or x64. Codec access on Any CPU architecture will not work, since there are no native codec libraries available for that architecture. For more information, see the fo-dicom wiki.



来源:https://stackoverflow.com/questions/52542678/render-jpeg-2000-image-compression-dicom-with-fo-dicom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!