I need to compute some statistics inside of sphere clips (mean, standard deviation, quantiles). One clip contains approx. 300 points with 5 variables of Interest each point. How do i pass my data to the statistics functions?
To get the single values I could use for example: paraview.servermanager.Fetch(clip1).GetPointData().GetArray(0).GetTuple(2)
wich gives me the value of 1st metadata of the 3rd point.
It would be better though to pass the whole object with all data directly.
The DescriptiveStatistics-function i would start like this:
stat = vtk.vtkDescriptiveStatistics
stat.SetInputArrayToProcess(...) (???)
Is it right to use SetInputArrayToProcess()? What would be the Input?
If you are going to use the VTK classes directly instead of via ParaView’s filters, then you should construct a vtkTable (say table) and pass it to the filter stat.SetInputData(table). This is easy – just add the point-data arrays from your clip filter as columns to the table. Once you have set the input table, you need to configure the stat filter to indicate (1) which columns you want statistics on and (2) which phases you want to run (most probably Learn and Derive in your case) before calling stat.Update().