[vtkusers] Modified() on PolyData if PolyDataReader started in a different thread

Sophonet vtk12af6bc42 at kant.sophonet.de
Sat Apr 1 03:56:29 EDT 2017


Problem is solved. It was caused by the fact that the polydata not only 
was read in a separate thread (which I guess would be fine) but actually 
in a separate dll with static VTK linking. Therefore, it was using 
another static timestamp as reference which was not considered later in 
the rendering pipeline.



On 2017-03-31 14:11, Sophonet wrote:
> Hi list,
> 
> in an application, I am reading vtkPolyData from file (using
> vtkPolyDataReader), but I am doing this in a separate thread (started
> with C++11 std::async()) such that loading the data does not block the
> UI. The rest of the rendering pipeline is set up in the main thread,
> only reading takes place in a worker thread.
> 
> Strangely, when I modify Points in that mesh (in the main thread) via
> SetPoint() later and call Modify(), the changes are not mapped to the
> renderwindow after calling Render().
> 
> If I read the data in the main thread, the problem does not occur,
> i.e. the Modify() call indeed leads to mapping the changes to the
> window.
> 
> What do I need to call in the main thread, after retrieving the data
> from the future<> with get() such that the Modify() mechanism works?
> 
> Thanks,
> 
> Sophonet
> 
> _______________________________________________
> 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
> 
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers


More information about the vtkusers mailing list