[vtkusers] multicore support

David E DeMarle dave.demarle at kitware.com
Thu Dec 4 06:24:46 EST 2008


>>
>> I have done this before in ParaView by building a reader which has a
>> method which can safely determine if the asynchronous process has new
>> data ready (via asynchronous messages or file status) when it is
>> ready, the reader calls Modified() on itself. Idle events at the
>> source end of the pipeline (RenderWindowInteractor for example)
>> periodically call this method and when necessary update the pipeline
>> (pull) by calling render. In ParaView it is a bit more complicated
>> than that because of the dataserver/renderserver/client breakup.
>
> when the reader calls Modified(), at which point is the data loaded into the
> pipeline?  at the moment i must construct and copy the data into the
> pipeline while in the main thread, as I cannot build vtkDataObjects in a
> separate thread.

In RequestData().

After a filter's Modified() is called, the next downstream Update()
will eventually cause the filter's RequestData() method to be called.
At this point the filter's job is to populate its output. This is
where you should fill in the filter's output data objects with new
content. I say eventually because before that happens
RequestDataObject() and RequestInformation() can get called before
RequestData() too. Their jobs are to create a new empty data object of
the correct type for the output and to provide whatever lightweight
meta information they quickly can respectively.



-- 
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



More information about the vtkusers mailing list