Wednesday, May 22, 2013
Google Custom Search

Our Community

Membership Membership:
Latest New User Latest: LizzieW
New Today New Today: 6
New Yesterday New Yesterday: 13
User Count Overall: 28663

People Online People Online:
Visitors Visitors: 11
Members Members: 1
Total Total: 12

Online Now Online Now:
01: hakan79

ClearCanvas Community Forums

We've moved our Developer Forums!
To better assist our open source community, we have moved our repository and developer forums to GitHub. You can access the new developer forums on our ClearCanvas GitHub issues board.

Cannot load compressed image
Last Post 2012-03-08 11:39 AM by ty010624. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
ty010624
New Member
New Member
Posts:3

--
2012-03-07 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....



stewart
Senior Member
Senior Member
Posts:2336

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


Live and real-time support available for Personal and Team Edition customers
ty010624
New Member
New Member
Posts:3

--
2012-03-08 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

stewart
Senior Member
Senior Member
Posts:2336

--
2012-03-08 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.


Live and real-time support available for Personal and Team Edition customers
ty010624
New Member
New Member
Posts:3

--
2012-03-08 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
Copyright 2013 ClearCanvas Inc. All Rights Reserved