Question regarding "Virtual Memory exhausted" error?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
faisal_tum
Posts: 33
Joined: Fri, 2013-01-11, 15:37

Question regarding "Virtual Memory exhausted" error?

#1 Post by faisal_tum »

First of all I'd like to thank for your work. The library has been really helpful in what I wanted to do, and despite my total naivety at the beginning I'm now close to finishing what I wanted to do.

There's one last bit of work left and that is to deal with the "virtual memory exhausted" problem. The error doesn't normally occur, it occurs for rare DICOM files, but I still want to prevent it from happening. I want to know if I do some memory management and dedicate some large chunk of memory to the application which does the task of pixel data modification using DCMTK, will this more or less deal with the problem of virtual memory exhaustion? Or is it something that is completely depending on DCMTK library and I cannot change anything in preventing the error from happening?

Sorry, if my question is not clear to you due to my poor technical language skills. Thank you for your help.

J. Riesmeier
DCMTK Developer
Posts: 2541
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Question regarding "Virtual Memory exhausted" error?

#2 Post by J. Riesmeier »

Which classes/interfaces of the DCMTK are you using? Are the DICOM images compressed? Did you already check the Howtos on "Images and GSPS"?

faisal_tum
Posts: 33
Joined: Fri, 2013-01-11, 15:37

Re: Question regarding "Virtual Memory exhausted" error?

#3 Post by faisal_tum »

J. Riesmeier wrote:Which classes/interfaces of the DCMTK are you using?
Before loading the files, I'm registering the decoders using

Code: Select all

DJDecoderRegistration::registerCodecs()
and actually use the default decoding.

For loading the file I'm using

Code: Select all

DcmFileformat
, for getting the pointer to the dataset of the file I'm using

Code: Select all

DcmDataset
, for getting the pointer to the

Code: Select all

DCM_PixelData
element I'm using

Code: Select all

DcmElement
. I use the pointer to element to get the size of the uncompressed frame and Decompressed Color Model.

I register the encoder using

Code: Select all

DJEncoderRegistration::registerCodecs()
, in this case I do change the parameter

Code: Select all

pWriteYBR422
when ever necessary.

The Virtual Memory Exhaustion error occurs when I try to use the method

Code: Select all

putAndInsertUint8Array()
. Otherwise everything works fine.
J. Riesmeier wrote:Are the DICOM images compressed?
Yes, the error occurs when the DICOM images are compressed, otherwise they work fine.

J. Riesmeier wrote:Did you already check the Howtos on "Images and GSPS"?
Yes, I have checked the documentations thoroughly, I've followed all the previous questions and how-to's to make progress that I made until now.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest