[vtkusers] Updating Filter Inputs and Outputs

David E DeMarle dave.demarle at kitware.com
Fri Mar 10 13:27:00 EST 2006


Hi Chris,

I think what you are missing is calling Modified() on the vtkImageImport 
whenever a new array arrives off the network. This will let the 
downstream filters know that what they think they know about the image 
data is out of date and need to be revisted before processing.

hth,
Dave DeMarle



Chris Hahn wrote:

> Hi There
>
> I'm very new to vtk, so please bear with me if these questions seem 
> trivial or obvious. Anyways, I'm currently using vtk to display image 
> data which is being repeatedly updated over a network connection. 
> Basically, this data is being streamed in C-array format, so I'm using 
> vtkImageImport to import it and then I display the image using 
> vtkImageViewer. Every time I receive new data, I call the render 
> method for the image viewer and the image is updated on my screen. My 
> problem occurs when I try to use any sort of image filter on the 
> output of vtkImageImport. If I do this, the filter will only work on 
> the first image. As soon as the incoming image data is changed, the 
> filter output becomes a blank screen. The only way I've been able to 
> get it to work is to delete and recreate the filter before I call the 
> render method every time that the image data is changed. This seems 
> inefficient and (hopefully) unnecessary. This has occurred for every 
> filter that I've tried to play with, including vtkImageGaussianSmooth, 
> vtkImageMagnify and vtkImageFlip.
>
> So my questions are the following: how can I use filters in a case 
> like this without deleting and recreating the filter every time the 
> image is changed? Is that even possible? Also, is using the 
> vtkImageViewer and constantly calling the render method the right way 
> (i.e. the fastest/most effiicient way) to display a frequently 
> updating image?
>
> Any help would be greatly appreciated.
> Thanks,
> Chris
> _______________________________________________
> 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