[vtkusers] Failure to allocate memory when

David Brayford dbrayford at gmail.com
Wed Oct 5 14:43:56 EDT 2011


I get the following crash "Description: Failed to allocate memory for
image." when calling filter->update(); on Linux (see code below).
However, when I run the program on Windows 7 I don't get the crash.
Any suggestions on what I need to do to fix this?

      writer->SetFileName( str );
        writer->SetInput( rescaler->GetOutput() );

        try
        {
          std::cout << "Writing image: " << std::endl;
          writer->Update();
        }
        catch( itk::ExceptionObject & err )
        {
          std::cerr << "ERROR: ExceptionObject caught !" << std::endl;
          std::cerr << err << std::endl;
        }

            filter->Update();


Thanks
David



More information about the vtkusers mailing list