[vtkusers] Bug in Polydata Reset-Method

Rackwitz, Karl Karl.Rackwitz at medizin.uni-leipzig.de
Fri Sep 30 09:58:45 EDT 2011


Hello all,

I'm triangulating Pointclouds of a Surfacescanner near realtime. 3D-Video perhaps.
I allocate memory for Points and Polydata once and call Reset() for each new Cloud.
in the method responsible for the display exist following lines of code:

    poly->Reset(); //make Object look empty without deleting memory
    poly->DeleteCells(); // <-- !!
    ...
    for()
        poly->InsertNextCell();
    ...
    poly->modified();

Commenting the marked line out results in an Error:
    vtkIntArray cannot allocate 150000000 Objects of size 4Bytes.

The Problem:
    int MaxId of the Cells isn't reseted as one would expect.

Solution:
    Call deleteCells.

I think its a bug. Excuse me if the form of this Post does not conform.

Greetings,
Karl






More information about the vtkusers mailing list