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

Method Visit

Filters/Statistics/vtkExtractStatisticalModelTables.cxx:81–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 void Visit(int nodeId) override
82 {
83 auto indices = this->GetCurrentDataSetIndices();
84 int parentNode = nodeId;
85 int midIdx = indices.size() > 1 ? 0 : -1;
86 for (const auto& index : indices)
87 {
88 auto* pd = this->In->GetPartitionedDataSet(index);
89 if (!pd || pd->GetNumberOfPartitions() == 0)
90 {
91 continue;
92 }
93 unsigned int np = pd->GetNumberOfPartitions();
94 if (np > 1 && midIdx < 0)
95 {
96 midIdx = 0;
97 }
98 // Loop over partitions. If any is a statistical model, add its tables.
99 for (unsigned int ii = 0; ii < np; ++ii)
100 {
101 if (auto* model = vtkStatisticalModel::SafeDownCast(pd->GetPartitionAsDataObject(ii)))
102 {
103 if (midIdx >= 0)
104 {
105 std::string midNodeName = vtk::to_string(midIdx++);
106 parentNode = this->AssemblyOut->AddNode(midNodeName.c_str(), nodeId);
107 }
108 AddModelToAssembly(this->Out, model, this->AssemblyOut, parentNode);
109 }
110 }
111 }
112 }
113};
114
115} // anonymous namespace

Callers 1

RequestDataMethod · 0.45

Calls 9

AddModelToAssemblyFunction · 0.85
GetPartitionedDataSetMethod · 0.80
to_stringFunction · 0.50
sizeMethod · 0.45
GetNumberOfPartitionsMethod · 0.45
AddNodeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected