MCPcopy Create free account
hub / github.com/Kitware/VTK / CreateChunkedHdfDataset

Method CreateChunkedHdfDataset

IO/HDF/vtkHDFWriterImplementation.cxx:416–447  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

414
415//------------------------------------------------------------------------------
416vtkHDF::ScopedH5DHandle vtkHDFWriter::Implementation::CreateChunkedHdfDataset(hid_t group,
417 const char* name, hid_t type, hid_t dataspace, hsize_t numCols, hsize_t chunkSize[],
418 int compressionLevel)
419{
420 vtkHDF::ScopedH5PHandle plist = H5Pcreate(H5P_DATASET_CREATE);
421 if (plist == H5I_INVALID_HID)
422 {
423 return H5I_INVALID_HID;
424 }
425 H5Pset_layout(plist, H5D_CHUNKED);
426 if (numCols == 1)
427 {
428 H5Pset_chunk(plist, 1, chunkSize);
429 }
430 else
431 {
432 H5Pset_chunk(plist, 2, chunkSize); // 2-Dimensional
433 }
434
435 if (compressionLevel != 0)
436 {
437 H5Pset_deflate(plist, compressionLevel);
438 }
439
440 vtkHDF::ScopedH5DHandle dset =
441 H5Dcreate(group, name, type, dataspace, H5P_DEFAULT, plist, H5P_DEFAULT);
442 if (dset == H5I_INVALID_HID)
443 {
444 return H5I_INVALID_HID;
445 }
446 return dset;
447}
448
449//------------------------------------------------------------------------------
450vtkHDF::ScopedH5SHandle vtkHDFWriter::Implementation::CreateDataspaceFromArray(

Callers 1

InitDynamicDatasetMethod · 0.95

Calls 1

H5Pset_deflateFunction · 0.85

Tested by

no test coverage detected