Hi,
I used RleLossless to compress a DICOM image. It was compressed fine. But then when I loaded the image back with DicomFile.Load(), it always threw exception: "Unexpected failure (UnknownError) reading file at offset 5244".
I tried different compression, like JpegLosslessNonHierarchicalProcess14 or other Jpeg compression, the compressed image always failed on loading back with the same exception but different offset number.
I simply have the following lines of code:
sourceDcm = new DicomFile(sourceFile);
sourceDcm.Load();
sourceDcm.ChangeTransferSyntax(TransferSyntax.JpegLosslessNonHierarchicalProcess14);
sourceDcm.Save(compressedFile);
compressedDcm = new DicomFile(compressedFile);
compressedDcm.Load();
Exception was always thrown from the last line. I wonder what could be causing this exception?
Thanks a lot for your help! I've been struggling with this for a day....