[vtkusers] about exchanging images within Render Windows

Eric E. Monson emonson at cs.duke.edu
Thu Apr 15 14:10:42 EDT 2010


Hey,

Just to clarify a bit -- you are displaying one dicom series in some way (are you rendering just one slice of a larger 3D stack?), and then you have another completely different series of images (with different properties?) that you want to switch to, but you're not sure what would be the most efficient way to switch between the first series and the second (and so on)? (Or, do you have a list of files that you're displaying individually and you're just wanting to switch between viewing the individual images in the list of files?)

What happens when you just call SetFileNames() on your reader with the new file list, and then renderWin.Render()? Is the update too slow?

In general, I think you shouldn't have to swap out the actor or renderer, but can just change the input to an earlier part of your pipeline with the new element. For example, if you wanted to read your next series while still displaying your first, I bet you could set up a second reader and Update() it, then switch the input to the vtkImageMapTo... to the second reader and call renWin.Render() to show the new set. But if memory usage is a big issue, just changing the properties of the reader for the new series and then updating the pipeline will probably suit you best.

Let us know if I'm misunderstanding what you're trying to do. Or, describe what you've tried so far and what isn't working well.

-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Apr 14, 2010, at 6:13 PM, Lic. José M. Rodriguez Bacallao wrote:

> hi folks, I have one Render Window and a list of dicom series (list of
> vtkImageData), what I need to do is to dynamically exchange the
> current displayed serie from one to another. Which is the better way
> to do it, removing the actor that represent the serie and adding the
> new one or removing the renderer that have the actor and adding the
> new one?. I am trying to get my memory usage as low as possible
> without affect too much the performance.
> 
> A basic pipeline for one serie is the following:
> 
> vtkGDCMImageReader -> vtkImageMapToWindowLevelColors -> vtkImageActor
> -> vtkRenderer -> vtkRenderWindow (Qt)
> 
> which component of the pipeline to change to achieve this?
> 
> -- 
> Lic. José M. Rodriguez Bacallao
> Centro de Biofisica Medica
> -----------------------------------------------------------------
> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.
> 
> Recuerda: El arca de Noe fue construida por aficionados, el titanic
> por profesionales
> -----------------------------------------------------------------
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK 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