MCPcopy Create free account
hub / github.com/Kitware/VTK / ComputeDerivedData

Method ComputeDerivedData

Filters/ParallelStatistics/vtkGenerateStatistics.cxx:1761–1790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1759}
1760
1761int vtkGenerateStatistics::ComputeDerivedData(vtkPartitionedDataSetCollection* model)
1762{
1763 // Iterate over the statistical models in the PDC and add derived
1764 // statistics to them.
1765 int numPDs = model->GetNumberOfPartitionedDataSets();
1766 for (int ii = 0; ii < numPDs; ++ii)
1767 {
1768 auto* pds = model->GetPartitionedDataSet(ii);
1769 for (unsigned int jj = 0; jj < pds->GetNumberOfPartitions(); ++jj)
1770 {
1771 if (auto* stats = vtkStatisticalModel::SafeDownCast(pds->GetPartitionAsDataObject(jj)))
1772 {
1773 // Configure this->StatisticsAlgorithm for Learn mode
1774 // and run this->StatisticsAlgorithm
1775 this->StatisticsAlgorithm->SetInputDataObject(vtkStatisticsAlgorithm::INPUT_MODEL, stats);
1776 this->StatisticsAlgorithm->SetLearnOption(false);
1777 this->StatisticsAlgorithm->SetDeriveOption(true);
1778 this->StatisticsAlgorithm->SetAssessOption(false);
1779 this->StatisticsAlgorithm->SetTestOption(false);
1780 this->StatisticsAlgorithm->Update();
1781
1782 // Copy or merge the model output into the given PDC
1783 // TODO: Do this better (match structure, look at SingleModel ivar)
1784 stats->ShallowCopy(
1785 this->StatisticsAlgorithm->GetOutputDataObject(vtkStatisticsAlgorithm::OUTPUT_MODEL));
1786 }
1787 }
1788 }
1789 return 1;
1790}
1791
1792VTK_ABI_NAMESPACE_END

Callers 1

RequestDataMethod · 0.95

Calls 8

GetPartitionedDataSetMethod · 0.80
GetNumberOfPartitionsMethod · 0.45
SetInputDataObjectMethod · 0.45
UpdateMethod · 0.45
ShallowCopyMethod · 0.45
GetOutputDataObjectMethod · 0.45

Tested by

no test coverage detected