[Insight-developers] Memory exception
Dan Mueller
dan.muel at gmail.com
Mon Nov 24 07:25:33 EST 2008
Hi Ivan,
Perhaps try the following:
try
{
writer->Update();
}
catch( itk::ExceptionObject & excp )
{
std::cerr << excp << std::endl;
}
This should provide some more details regarding this issue. Let us
know what you find.
HTH
Regards, Dan
2008/11/24 ivan gm <ivan.gm.itk at gmail.com>:
> 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.
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list