(vtkarray, verbose=0)
| 19 | # it will be called with a loop, it offers the option to display the entire |
| 20 | # array or just the first few tuples. This is mainly used for debug. |
| 21 | def print_array (vtkarray, verbose=0) : |
| 22 | ntuples = min(3, vtkarray.GetNumberOfTuples()) |
| 23 | if verbose : ntuples = max(3, vtkarray.GetNumberOfTuples()) |
| 24 | |
| 25 | ncomps = min(6, vtkarray.GetNumberOfComponents()) |
| 26 | if verbose : ncomps = max(6, vtkarray.GetNumberOfComponents()) |
| 27 | |
| 28 | for i in range(ntuples) : |
| 29 | for j in range(ncomps) : |
| 30 | print "%+12.6f" % vtkarray.GetComponent(i, j), |
| 31 | sys.stdout.flush() |
| 32 | print '' |
| 33 | sys.stdout.flush() |
| 34 | |
| 35 | # test0 tests all python programmable filters that work with data array |
| 36 | # associated with points/cells. The data array could be an array of |
no test coverage detected