[vtkusers] Render Speed....

Beau Sapach beau.sapach at ualberta.ca
Wed Mar 14 11:31:52 EDT 2007


Hi Michael,

Yes, I do already have vtkImageData objects in memory, a CArray object
contains them all. I've actually tried your suggested method of using a
separate vtkImageActor for each image and simply cycling through visibility
of each one to create the animation.

The performance of this setup seemed to be about the same, and it used twice
as much memory.  Since vtkImageActors set their position based on the image
origin and all images have the same origin (0,0,0) I think that all the
actors except for one (the first or the last to be added to the renderer)
would be obscured and so wouldn't actually be rendered during the first call
to Render().

I could be wrong but it seems to me that the underlying graphics routines
would be smart enough not to spend time and memory rendering pixels for
something that's not visible. So in short, that approach didn't work for me
but I appreciate your suggestion, if you have any other ideas please let me
know!  Thanks!

Beau

-----Original Message-----
From: Michael Scarpa [mailto:m.scarpa at uva.nl] 
Sent: Wednesday, March 14, 2007 2:46 AM
To: Beau Sapach
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Render Speed....

Hi.

I'm not sure I understand your situation correctly, but I assume that  
you're not referring to the overhead caused by actually *generating*  
the vtkImageData (e.g. reading a file).  So assuming that you have  
all your data sets loaded (i.e. you have a bunch of vtkImageData  
objects, or filters that generate vtkImageData output *and* which are  
*all* updated), I guess you might speed things up by creating a  
separate mapper/actor set for every data set separately, and simply  
switching the visibility of the various actors on/off, according to  
your needs.  After all, the mappers do have to process the data  
before it can actually be rendered, so this way you can have this  
processing happen all at once beforehand.  Just make sure that every  
actor is rendered once before you turn it's visibility off (or,  
alternatively, make sure the mappers are updated).

Please let me know if this was any help.

With kind regards,

Michael


On 9 Mar, 2007, at 23:50, Beau Sapach wrote:

> Hello everyone,
>
>
>
> I've posted a number of questions recently but got no response.  I  
> do realize however that most of my recent troubles have revolved  
> around multithreading, not VTK.
>
>
>
> I hope this question is fairly straight forward.  Every time I  
> change the vtkImageData that my vtkImageActor is using, the call to  
> Render() takes a bit of time.  But once the image is displayed, I  
> can pan, zoom and rotate very smoothly and in real-time.  I'm  
> assuming that the interactor calls Render() somewhere along the  
> line for every shift in mouse position.  How do I make my calls to  
> Render() that fast?  I suspect it has to do with getting my  
> vtkImageData out of system memory and into the frame buffer, once  
> that's accomplished calls to Render() are fast.  So every time I  
> switch vtkImageData on my vtkImageActor that new data has to be  
> sent to the graphics card correct?  Is there a way of sending  
> multiple images into the graphics card in one fell swoop and THEN  
> changing which one is displayed?
>
>
>
> Beau
>
>
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/ 
> Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers







More information about the vtkusers mailing list