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

Method RequestData

Filters/HyperTree/vtkHyperTreeGridCellCenters.cxx:108–139  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

106
107//------------------------------------------------------------------------------
108int vtkHyperTreeGridCellCenters::RequestData(
109 vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
110{
111 // Get the information objects
112 vtkInformation* inInfo = inputVector[0]->GetInformationObject(0);
113 vtkInformation* outInfo = outputVector->GetInformationObject(0);
114
115 // Retrieve input and output
116 this->Input = vtkHyperTreeGrid::SafeDownCast(inInfo->Get(vtkDataObject::DATA_OBJECT()));
117 this->Output = vtkPolyData::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT()));
118
119 // Initialize output cell data
120 this->InData = this->Input->GetCellData();
121 this->OutData = this->Output->GetPointData();
122 this->OutData->CopyAllocate(this->InData);
123
124 // General cell centers of hyper tree grid
125 this->ProcessTrees();
126
127 // Squeeze output data
128 this->OutData->Squeeze();
129
130 // Clean up
131 this->Input = nullptr;
132 this->Output = nullptr;
133 this->InData = nullptr;
134 this->OutData = nullptr;
135
136 this->UpdateProgress(1.);
137
138 return 1;
139}
140
141//------------------------------------------------------------------------------
142void vtkHyperTreeGridCellCenters::ProcessTrees()

Callers 1

ProcessRequestMethod · 0.95

Calls 8

ProcessTreesMethod · 0.95
GetInformationObjectMethod · 0.80
GetMethod · 0.45
GetCellDataMethod · 0.45
GetPointDataMethod · 0.45
CopyAllocateMethod · 0.45
SqueezeMethod · 0.45
UpdateProgressMethod · 0.45

Tested by

no test coverage detected