[Insight-developers] Memory exception

ivan gm ivan.gm.itk at gmail.com
Mon Nov 24 07:16:53 EST 2008


Hello:

Im trying to save an image in a file with the code bellow:
                        writer = WriterType::New();
                        writer->SetFileName(originalName.c_str());
                        writer->SetImageIO( itk:DicomImageIO::New() );
    // itk::AnalyzeImageIO::New());
                        writer->SetInput( this->tempImage1 );
                        writer->Update();
When i use a itk::AnalyzeImageIO it works fine but when I change it to
DicomImageIO (because i want to save the file in dcm format instead of hdr)
the program crash with the following Excetion message:

Excepción no controlada en 0x7c812aeb en myprogram.exe: Excepción de
Microsoft C++: CMemoryException en la ubicación de memoria 0x0ffbd514.

I think the problem is that my computer don't have enough RAM memory... can
anybody tell me if I can't solve the problem without increasing the RAM?

On the other hand, I tried to handle this CMemoryException with the
following code:
                    try {
                          //code
                    } catch (CMemoryException e) {
                         printf("whatever");
                    }
But it doesn't catch anything. Any help?


Thanks a lot.

Iván García Martínez.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20081124/a75c79e0/attachment.htm>


More information about the Insight-developers mailing list