<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Juan <br>
<br>
The simplest approach is to trigger an event when data becomes
available, use this event to call update on the pipeline from the sink
end. Sometimes this is not as easy as it sounds (i.e. you may not be
able to create/trigger an event) - creating multiple threads can help -
one thread can check to see if data is ready and trigger the pipeline
update when it is. The rest of the time it should sleep. Always be
careful with vtk if using threads as many functions will cause problems
if multiple threads cause updates in connected pipelines (gui
threads+executing threads = hard to manage).<br>
<br>
JB<br>
<blockquote
 cite="mid:ff94a7490712101230p57b74c1p466812ff9ac4339d@mail.gmail.com"
 type="cite">Hi,<br>
  <br>
I'm fairly new to VTK and I have a question regarding the VTK
architecture.<br>
  <br>
Basically I have a specialized image reconstruction library "like" VTK
but it is data-driven. Basically when data goes in, the processed data
comes out of the pipeline. I understand that VTK works the other way
around. When data is required at the output, it backpropagates that
request until it finds which portions of the pipeline need to be
updated.
  <br>
  <br>
I would like to connect both pipelines (data-driven at the input of
VTK) but I'm having some trouble. It would be ideal for me if the whole
pipeline is data-driven, but it would be also fine if the VTK portion
remains demand-driven, as long as it gets updated when new data arrives
from the "data-driven" portion. I looked at video capture examples but
unfortunately they relay on the VTK event loop. The data driven portion
of the pipeline already has an event loop (to react to new data at the
input) so this is not compatible with just mark the data as "Modified"
and wait for the pipeline to be updated (as I understand how VTK
works). What does work though is if I manually call the render method
of the visualizer after I feed the VTK pipeline. Unfortunately, that
solution its a little bit odd as the "data conversion" object (the one
who connected the data-driven pipeline with VTK) will need to know
about the last object in the pipeline to call the update method (maybe
this is the only way).
  <br>
  <br>
  <br>
Is there a good solution to this kind of problem? I looked into the
"pipeline executive" architecture but I don't know enough of that and
it seems that the only propagation methods available are demand-driven.
  <br>
  <br>
I'll appreciate if someone who has some experience with this could
point me in the right direction.<br>
  <br>
Thanks<br>
  <br>
Juan<br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="78">-- 
John Biddiscombe,                            email:biddisco @ cscs.ch
<a class="moz-txt-link-freetext" href="http://www.cscs.ch/about/BJohn.php">http://www.cscs.ch/about/BJohn.php</a>
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82</pre>
</body>
</html>