[vtkusers] [Insight-users] std::bad_alloc on rendering with vtkImagePlaneWidget

John Drescher drescherjm at gmail.com
Tue Oct 6 08:25:27 EDT 2009


> I already loaded an DICOM 3d image in ITK and succesfully piped it to an vtkImage Object. I also already visualized it like in the Medical1.cxx example but now I want to use the vtkImagePlaneWidget.
>
> The code compiles and links but in the Renderer() procedure of the vtkRenderer i get a std::bad_alloc exception. Does anybody know something about that? Here is my code:
>

Have you some how ran out of memory? Remember on 32 bit operating
systems (especially windows) the address space is 2GB or 3GB and there
is the issue of address space fragmentation that further reduces the
ability to allocate large blocks. On 32 bit windows the largest block
is around 1.2GB as a result of this address space fragmentation unless
you use the /3GB boot switch, compile your application for
largeaddresssaware and probably rebase your dlls to mover them out of
the way.

John



More information about the vtkusers mailing list