[vtkusers] slow display
Shashidhar Kamath
skamath at xradia.com
Thu Sep 20 21:17:50 EDT 2001
Hi
I have the vtkImagedata that is given as input to vtkImageActor. So when
ever the data is changed im calling a update function which has following
lines in it. Then the RenderWindow->Render(); from the window expose event
i.e OnDraw gets called from MFC. Update function doesnot get called during
expose events, but only when data get changed.Expose events call only
RenderWindow->Render();
Is that necessary to do all these when the image data gets changed?? Im
asking this question because in our application the image data gets changed
say every one second and the painting really goes slow.
vtkPropCollection *pvtkPropCollection;
vtkProp *pvtkProp;
Renderer->GetActiveCamera()->ParallelProjectionOn();
Renderer->GetProps()->RemoveAllItems();
GetDocument()->GetvtkPropCollection(pvtkPropCollection);
pvtkPropCollection->InitTraversal();
while (pvtkProp = pvtkPropCollection->GetNextProp())
{
this->Renderer->AddProp(pvtkProp);
this->Renderer->ResetCamera();
}
Renderer->GetActiveCamera()->ParallelProjectionOn();
Renderer->GetActiveCamera()->SetParallelScale(256);//To set each new coming
512*512 image to occupy whole window
How can i improve the speed of painting ??
Thanks
Shashi
More information about the vtkusers
mailing list