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

Method RequestDataCellGrid

Filters/ParallelStatistics/vtkGenerateStatistics.cxx:881–912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

879}
880
881int vtkGenerateStatistics::RequestDataCellGrid(vtkCellGrid* cellGrid, vtkStatisticalModel* model)
882{
883 if (!cellGrid)
884 {
885 return 1;
886 }
887 auto samples = vtkSmartPointer<vtkTable>::New();
888 vtkNew<vtkCellGridSampleQuery> query;
889 query->IncludeSourceCellInfoOff();
890 query->IncludeSourceCellSiteOff();
891 query->SetOutput(samples);
892 query->SetInput(cellGrid);
893 if (!cellGrid->Query(query))
894 {
895 vtkErrorMacro("Could not produce sample table.");
896 return 0;
897 }
898 this->StatisticsAlgorithm->SetInputDataObject(vtkStatisticsAlgorithm::INPUT_DATA, samples);
899
900 // Configure this->StatisticsAlgorithm for Learn mode
901 // and run this->StatisticsAlgorithm
902 this->StatisticsAlgorithm->SetLearnOption(true);
903 this->StatisticsAlgorithm->SetDeriveOption(false);
904 this->StatisticsAlgorithm->SetAssessOption(false);
905 this->StatisticsAlgorithm->SetTestOption(false);
906 this->StatisticsAlgorithm->Update();
907
908 // Copy the computed model into the output model:
909 model->DeepCopy(
910 this->StatisticsAlgorithm->GetOutputDataObject(vtkStatisticsAlgorithm::OUTPUT_MODEL));
911 return 1;
912}
913
914int vtkGenerateStatistics::RequestDataPlain(vtkDataObject* dataObject, vtkStatisticalModel* model)
915{

Callers 1

Calls 8

NewFunction · 0.50
SetOutputMethod · 0.45
SetInputMethod · 0.45
QueryMethod · 0.45
SetInputDataObjectMethod · 0.45
UpdateMethod · 0.45
DeepCopyMethod · 0.45
GetOutputDataObjectMethod · 0.45

Tested by

no test coverage detected