------------------------------------------------------------------------------
| 1425 | |
| 1426 | //------------------------------------------------------------------------------ |
| 1427 | bool vtkHDFWriter::Implementation::GetSubFilesDatasetSize( |
| 1428 | const std::string& datasetPath, const std::string& groupName, hsize_t& totalSize) |
| 1429 | { |
| 1430 | totalSize = 0; |
| 1431 | for (auto& fileRoot : this->Subfiles) |
| 1432 | { |
| 1433 | if (H5Lexists(fileRoot, groupName.c_str(), H5P_DEFAULT) <= 0 || |
| 1434 | H5Lexists(fileRoot, datasetPath.c_str(), H5P_DEFAULT) <= 0) |
| 1435 | { |
| 1436 | if (PATH::ContainsAny(datasetPath, { PATH::OFFSETS })) |
| 1437 | { |
| 1438 | totalSize++; // For 0 cells, Offset is still [0] |
| 1439 | } |
| 1440 | continue; |
| 1441 | } |
| 1442 | vtkHDF::ScopedH5DHandle sourceDataset = H5Dopen(fileRoot, datasetPath.c_str(), H5P_DEFAULT); |
| 1443 | vtkHDF::ScopedH5SHandle sourceDataSpace = H5Dget_space(sourceDataset); |
| 1444 | std::vector<hsize_t> sourceDims(3); |
| 1445 | if (H5Sget_simple_extent_dims(sourceDataSpace, sourceDims.data(), nullptr) < 0) |
| 1446 | { |
| 1447 | return false; |
| 1448 | } |
| 1449 | totalSize += sourceDims[0]; |
| 1450 | } |
| 1451 | return true; |
| 1452 | } |
| 1453 | |
| 1454 | //------------------------------------------------------------------------------ |
| 1455 | vtkHDF::ScopedH5GHandle vtkHDFWriter::Implementation::GetSubfileNonNullPart( |
no test coverage detected