Xamarin with Fellow-oak DICOM doesn't not create DicomNative.dll in bin folder

638 views Asked by At

I have created on Windows 8.1 Xamarin Project (Shared Project, Xamarin.Android & Xamarin.iOS ) which is simple dicom image viewer.

We are using Fellow-oak Dicom installed via nuget-packages.

In Shared Project there is method responsible for loading new dicom image by using DicomImage object from Fellow-oak DICOM.

foreach(string file_name in files)
        {
            try
            {

                dicom_file = DicomFile.Open(file_name);
                DicomImage dcmimg = new DicomImage(file_name);

                file_list.Add(dcmimg);
            }catch(Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }
    }

Function which is responsible for loading DicomImage is called from Xamarin.Android After deploying app on mobile and trying to load dcm image the crash occurs and following error is displayed: “No codec registered for tranfer syntax: JPEG 2000 Image Compression”

After research I found out what is probably the source of the issue: missing DicomNative dll which should be created after building project but it doesn’t. So on the internet there were saying about setting target platform to either x64 or x86 but it didn’t help. I have set target platform of all projects in solution to x64 then I tried with x86.

Is there any other way to force including this dll ( I don't know from where I can download physically this lacking codec) or maybe some other fix for this problem ?

1

There are 1 answers

0
Anders Gustafsson On BEST ANSWER

In versions 2.0.x of fo-dicom for Xamarin iOS and Android, compressed codecs are not supported at all.

In version 3.0, which is currently under Beta, for Xamarin iOS and Android there is limited support for JPEG 8-bit baseline and progressive codecs and JPEG2000 8-bit (monochrome and RGB).

The comprehensive support, including 12- and 16-bit monochrome images, JPEG Lossless and JPEG-LS near lossless and lossless, is only available on .NET Framework and the Universal Windows Platform, UWP. The issue with the missing Dicom.Native DLL is only related to .NET Framework.

The .NET Framework and UWP implementations are using more complete C/C++ class libraries for codec support, whereas the Xamarin implementations are currently making use of the C# based managed code class libraries LibJpeg.NET and CSJ2K which are considerably more limited in a DICOM context.