------------------------------------------------------------------------------
| 106 | |
| 107 | //------------------------------------------------------------------------------ |
| 108 | int 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 | //------------------------------------------------------------------------------ |
| 142 | void vtkHyperTreeGridCellCenters::ProcessTrees() |
no test coverage detected