[vtkusers] Rendering slow with many actors

Jothy jothybasu at gmail.com
Mon Jul 25 05:40:44 EDT 2011


Hi all,

I am adding many actors to the renderer in a for loop.

But the rendering becomes slow, is there any way to make it fast.
vtkAppendPolyData will not work for me as I want to keep their color
different.

here is my code

*for (int i=0;i<this->NumberOfROIs;i++) *

*    {*

* *

*        double r=this->ROIColors[i][0]/255;*

* *

*        double g=this->ROIColors[i][1]/255;*

* *

*        double b= this->ROIColors[i][2]/255;*

* *

*        vtkActor* axROI=vtkActor::New();*

* *

*        axROI=this->cutAxialROI(this->meshList[i],scrollValue,r,g,b);    *

* *

*        this->axialRenderer->AddActor(axROI);*

* *

*    }*

* *

*    *

* *

*     *

* *

*}*

* *

*   *

* *

*    this->ui->AxialWidget->GetRenderWindow()->Render();*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110725/45654312/attachment.htm>


More information about the vtkusers mailing list