Browsing this Thread:   1 Anonymous Users


 Bottom   Previous Topic   Next Topic  Register To Post



System.OutOfMemoryException when trying to validate .dcm file
Just popping in
Joined:
2011/12/21 18:08
Group:
Registered Users
Posts: 2
Level : 1; EXP : 2
HP : 0 / 0
MP : 0 / 5
Offline
The exact error message is:


System
.Exception in MediaSession.csException of type 'System.OutOfMemoryException' was thrown.


I can load the image without errors using ImageJ and Sante DICOM Viewer FREE, but not using MicroDicom, so there must be something wrong with my image. I counted on DVT to tell me what...

I also tried to look at the DICOM header using DCMEditor, but it crashed similarly. I could look at the header using Sante DICOM Hexadecimal Viewer, but it's quite gruesome to find the error manually.

I'm using the latest version (2.6.6), on Windows XP SP3, 32 bits, with all the latest updates.

I tried to attach the image, but even compressed with .7z, it exceeds the 1000 K limit (it's a little over 4 MB). So I uploaded it to Mediafire, here:

http://www.mediafire.com/?p3denwo4c905iub

Posted on: 2011/12/22 17:44
Transfer the post to other applications Transfer


Re: System.OutOfMemoryException when trying to validate .dcm file
Webmaster
Joined:
2005/6/21 15:06
Group:
Webmasters
Registered Users
Core Developers
Content Owners
Steering Committee Members
Services Request Listeners
Webinar organisation
Posts: 254
Level : 14; EXP : 90
HP : 0 / 347
MP : 84 / 9657
Offline

Hi,

I downloaded the file and got exactly the same result on my (windows xp) system. I also tried to open your DICOM file with DICOMscope 3.5.1 (from office) and got a "Load failed" message.

As both DVTk and DICOMscope (which are completely independent DICOM implementations) and MicroDICOM (as you mentioned) cannot open this file, probably some problem(s) are present on byte level. These are of course the most difficult problems to solve.

Helping you further with this problem is outside the possibilities of DVTk.

Maybe another user on this forum wants to give it a try.

If you want to get dedicated support to solve this problem (even if this needs to be checked on byte level), also check http://www.dvtk.org/modules/wiwimod/i ... e=Services&cmenu=home.

Regards,
Marco


Posted on: 2011/12/23 10:41
Transfer the post to other applications Transfer


Re: System.OutOfMemoryException when trying to validate .dcm file
Just popping in
Joined:
2011/12/21 18:08
Group:
Registered Users
Posts: 2
Level : 1; EXP : 2
HP : 0 / 0
MP : 0 / 5
Offline
Hi, I got back to the problem yesterday and solved it today. I wanted to share the solution hoping it will inspire improvements on DVT.

Short story: pixel data on disk had a different size than advertised in the Frame Data tag (7FE0,0010).

Long story: We save our images, in DICOM format, to disk, twice. First, we save the full original image. Then, we apply enhancement filters which may involve cropping. Thing is, due to a subtle bug, the second time we saved the image, we opened the existing file in a mode which didn't write the file from scratch. Therefore, when we cropped the image, the header and cropped pixel data overwrote the original, but there was garbage left upto the end of the file. And this is what seemed to confuse DVT and the others.

A great tool which helped me diagnose this: David Clunie's dicom3tools.

Posted on: 2012/3/9 19:42
Transfer the post to other applications Transfer


Re: System.OutOfMemoryException when trying to validate .dcm file
Webmaster
Joined:
2005/6/21 15:06
Group:
Webmasters
Registered Users
Core Developers
Content Owners
Steering Committee Members
Services Request Listeners
Webinar organisation
Posts: 254
Level : 14; EXP : 90
HP : 0 / 347
MP : 84 / 9657
Offline

Hi,

thanks for letting us know what caused the problem!

Correct attribute lengths specified in a DICOM file and DICOM message is normally critical for correct interpretation of the stream. Depending on the implementation, some applications may handle incorrect attribute length better than other applications.

Trying to recover from these kind of problems is something we already keep in mind if we would decide to create a new architecture/implementation for the coding and encoding of a DICOM stream.

Regards,

Marco

 


Posted on: 2012/3/13 14:30
Transfer the post to other applications Transfer



 Top   Previous Topic   Next Topic

 Register To Post


You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]