| 135 | } |
| 136 | |
| 137 | void vtkUnstructuredGridToCellGrid::TranscribeQuery::AddCellAttributes( |
| 138 | vtkDataSetAttributes* attributes) |
| 139 | { |
| 140 | int numberOfArrays = attributes->GetNumberOfArrays(); |
| 141 | for (int aa = 0; aa < numberOfArrays; ++aa) |
| 142 | { |
| 143 | auto* arrayIn = attributes->GetAbstractArray(aa); |
| 144 | if (!arrayIn || !arrayIn->GetName()) |
| 145 | { |
| 146 | vtkWarningMacro("Empty or unnamed array " << aa << "."); |
| 147 | continue; |
| 148 | } |
| 149 | int nc = arrayIn->GetNumberOfComponents(); |
| 150 | vtkNew<vtkCellAttribute> attribOut; |
| 151 | std::string fieldSpace = vtkCellAttribute::EncodeSpace("ℝ", nc); |
| 152 | attribOut->Initialize(arrayIn->GetName(), fieldSpace, nc); |
| 153 | this->Output->AddCellAttribute(attribOut); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | vtkUnstructuredGridToCellGrid::vtkUnstructuredGridToCellGrid() |
| 158 | { |
nothing calls this directly
no test coverage detected