Do you have a question?

First Name:
Surname:
Email:
Phone:
Message:
Get Audio Code

Cannot load compressed image
Last Post 08 Mar 2012 11:39 AM by Kelly Y. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Kelly YUser is Offline
New Member
New Member
Posts:3

--
07 Mar 2012 02:59 PM  

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....



stewartUser is Offline
Veteran Member
Veteran Member
Posts:2359

--
08 Mar 2012 08:48 AM  
To figure out this kind of issue, we really need the image. Can you send us an anonymized copy?


Kelly YUser is Offline
New Member
New Member
Posts:3

--
08 Mar 2012 11:09 AM  

Please find an anonymized DICOM image attached.

The image can be loaded (DcmFile.Load()) fine, but after any type of compression, it throws the following exception on loading:

Unexpected failure (UnknownError) reading file at offset 5194

 


Attachment: testimg_anonymized.dcm

stewartUser is Offline
Veteran Member
Veteran Member
Posts:2359

--
08 Mar 2012 11:16 AM  
Thanks, we'll look into it as soon as we can, but we're pretty busy these days, so please be patient.


Kelly YUser is Offline
New Member
New Member
Posts:3

--
08 Mar 2012 11:39 AM  

Thanks a lot for your help! I just want to say this issue is very eacy to replicate. You only need those lines of code I posted. If you can let me know whether this is a library issue or something wrong with that image, it would be really great.

Thanks for looking into this!!!



You are not authorized to post a reply.

Active Forums 4.1