Dear all, I am doing proper orthogonal decomposition on a openfoam data set. The last step is to calculate the weighted sum of given timesteps of the dataset. But I found it is very difficult to do it in programmable filter because of 3 reasons:
1. In programmable filter it is difficult to pass weight vector to the Script; 2. In script of programmable filter, the locals() returns: [self, inputs, output, request], in which *self *is vtkPythonProgrammableFilter, *inputs *is a list of CompositeDataSet, *output *is CompositeDataSet, and *request *is vtkInformation. I do not know how to use it; And according to the blog [ http://berkgeveci.github.io/2014/09/02/programmable-filter/], I cannot loop over all timesteps in vtkPythonProgrammableFilter; The author of the blog recommend using vtkPythonAlgorithm, but 3. I do not know how to use vtk filters such as vtkPythonAlgorithm in paraview. I have tried some methods. But none of them worked. I tried to find how TemporalStatistics filter is implemented. I referred the code in this pipermail [ http://www.paraview.org/pipermail/paraview/2009-March/011443.html], it does not request different timestep. But only used timestep values passed with inputs; I read this article on wiki[http://www.paraview.org/Wiki/Time_in_ParaView]. But I am still confused. I tried >>>reader1.UpdatePipeline(t1) >>>reader2.UpdatePipeline(t2) The information tab in paraview shows different "Current data time" in reader1 and reader2. But if I use ProgrammableFilter to use reader1 and reader2 as inputs, it seems that the result is controlled by VCR time on the top of paraview GUI. Some more frustrating problem is because of the complexity of proxies/servermanager structure of paraview, I cannot access the vtk Object behind of paraview proxies. Even if I can write a vtk class in python like what Berk Geveci did in his blog [ http://berkgeveci.github.io/2014/11/09/streaming-time/], I cannot use it in paraview directly. My question is: What can I do next to calculate weighted sum of given timesteps in paraview? Thanks. Di CHENG Institute of Mechanics, Chinese Academy of Sciences No.15 Beisihuanxi Road, Beijing (100190) P. R. China E-mail: [email protected] Tel.: +86-15801594911
_______________________________________________ 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/paraview
