| 851 | } |
| 852 | |
| 853 | int vtkGenerateStatistics::RequestDataPD(vtkPartitionedDataSet* pd, vtkStatisticalModel* model) |
| 854 | { |
| 855 | if (!model) |
| 856 | { |
| 857 | vtkErrorMacro("No output model."); |
| 858 | return 0; |
| 859 | } |
| 860 | if (!pd) |
| 861 | { |
| 862 | // OK not to have data. |
| 863 | return 1; |
| 864 | } |
| 865 | vtkNew<vtkStatisticalModel> localModel; |
| 866 | vtkNew<vtkDataObjectCollection> models; |
| 867 | for (unsigned int ii = 0; ii < pd->GetNumberOfPartitions(); ++ii) |
| 868 | { |
| 869 | localModel->Initialize(); |
| 870 | if (this->RequestDataNonComposite(pd->GetPartitionAsDataObject(ii), localModel) == 1) |
| 871 | { |
| 872 | // Aggregate into the global model for all partitions. |
| 873 | models->RemoveAllItems(); |
| 874 | models->AddItem(localModel); |
| 875 | this->GetStatisticsAlgorithm()->Aggregate(models, model); |
| 876 | } |
| 877 | } |
| 878 | return 1; |
| 879 | } |
| 880 | |
| 881 | int vtkGenerateStatistics::RequestDataCellGrid(vtkCellGrid* cellGrid, vtkStatisticalModel* model) |
| 882 | { |
no test coverage detected