------------------------------------------------------------------------------
| 1194 | |
| 1195 | //------------------------------------------------------------------------------ |
| 1196 | hsize_t vtkHDFWriter::Implementation::GetNumberOfCellsSubfile(const std::string& basePath, |
| 1197 | std::size_t subfileId, hsize_t part, bool isPolyData, const std::string& groupName) |
| 1198 | { |
| 1199 | if (!isPolyData) |
| 1200 | { |
| 1201 | return this->GetSubfileNumberOf(basePath, PATH::NUMBER_OF_CELLS, subfileId, part); |
| 1202 | } |
| 1203 | |
| 1204 | if (isPolyData && groupName.find(PATH::CELL_DATA) != std::string::npos) |
| 1205 | { |
| 1206 | // Sum up the number of cells for each primitive type |
| 1207 | return std::accumulate(PrimitiveNames.begin(), PrimitiveNames.end(), 0, |
| 1208 | [this, subfileId, part, basePath](vtkIdType sum, std::string prim) |
| 1209 | { |
| 1210 | return sum + |
| 1211 | this->GetSubfileNumberOf(basePath, prim + "/" + PATH::NUMBER_OF_CELLS, subfileId, part); |
| 1212 | }); |
| 1213 | } |
| 1214 | else |
| 1215 | { |
| 1216 | return this->GetSubfileNumberOf(groupName, PATH::NUMBER_OF_CELLS, subfileId, part); |
| 1217 | } |
| 1218 | } |
| 1219 | |
| 1220 | //------------------------------------------------------------------------------ |
| 1221 | std::string vtkHDFWriter::Implementation::GetBasePath(const std::string& fullPath) |
no test coverage detected