------------------------------------------------------------------------------
| 1325 | |
| 1326 | //------------------------------------------------------------------------------ |
| 1327 | bool vtkHDFReader::Implementation::AppendCellDataForHyperTree( |
| 1328 | std::vector<vtkSmartPointer<vtkAbstractArray>>& cellArrays, vtkIdType cellOffset, |
| 1329 | vtkIdType inputCellOffset, const vtkIdType step, const vtkIdType readableTreeSize) |
| 1330 | { |
| 1331 | constexpr int cellType = vtkDataObject::AttributeTypes::CELL; |
| 1332 | |
| 1333 | for (auto& array : cellArrays) |
| 1334 | { |
| 1335 | std::string arrayName = array->GetName(); |
| 1336 | vtkIdType startReadOffset = cellOffset + |
| 1337 | std::max<vtkIdType>(this->GetArrayOffset(step, cellType, arrayName), 0) + inputCellOffset; |
| 1338 | |
| 1339 | std::vector<hsize_t> arrayReadExtent{ static_cast<hsize_t>(startReadOffset), |
| 1340 | static_cast<hsize_t>(startReadOffset + readableTreeSize) }; |
| 1341 | |
| 1342 | vtkSmartPointer<vtkDataArray> addedArray; |
| 1343 | if ((addedArray = vtk::TakeSmartPointer( |
| 1344 | this->NewArray(cellType, arrayName.c_str(), arrayReadExtent))) == nullptr) |
| 1345 | { |
| 1346 | vtkErrorWithObjectMacro(nullptr, "Error reading array " << arrayName); |
| 1347 | return false; |
| 1348 | } |
| 1349 | |
| 1350 | // Copy read array at the end of the data array |
| 1351 | array->InsertTuples(array->GetNumberOfTuples(), readableTreeSize, 0, addedArray); |
| 1352 | } |
| 1353 | |
| 1354 | return true; |
| 1355 | } |
| 1356 | |
| 1357 | //------------------------------------------------------------------------------ |
| 1358 | bool vtkHDFReader::Implementation::AppendMaskForHyperTree(vtkHyperTreeGrid* htg, |
no test coverage detected