Hello.
I am pretty new to this group, now busy testing a few free and commercial DICOM .NET libraries.
I have been quite successful performing a few unit tests with FO-DICOM until I stumbled over a first problem, namely, I have been so far unable to open a DicomImage from a file with JPEG Transfer Syntax. Whenever I try to perform a
DicomImage image = new DicomImage(fileName);
with a file containing a JPEG I am getting a TypeInitializationException in the DicomImage.Load(DicomDataset dataset, int frame) function, namely, in its first operator,
Dataset = DicomTranscoder.ExtractOverlays(dataset); // (*)
The inner exception sounds like "Cannot cast the underlying exported value of type 'Dicom.Imaging.Codec.DicomJpegProcess1Codec (ContractName=\"Dicom.Imaging.Codec.IDicomCodec\")' to type 'Dicom.Imaging.Codec.IDicomCodec'." which I cannot understand.
Interesting enough, the dataset itself in // (*) is loaded and seems to be valid. NativeDicom and NativeDicom64 dlls are referenced by the project and are physically in the same (working) folder where Dicom.dll is. Also, DICOM Dump can read and display the dataset.
I wonder what I am doing wrong.
Thanks for all tips and suggestions,
Stan