Используя HDF5DotNet, может ли кто-нибудь указать мне пример кода, который откроет файл hdf5, извлечет содержимое набора данных и распечатает содержимое для стандартного вывода?
До сих пор у меня есть следующее:
H5.Open();
var h5 = H5F.open("example.h5", H5F.OpenMode.ACC_RDONLY);
var dataset = H5D.open(h5, "/Timings/aaPCBTimes");
var space = H5D.getSpace(dataset);
var size = H5S.getSimpleExtentDims(space);
Затем он немного запутывается.
На самом деле я хочу сделать некоторую обработку содержимого набора данных, но я думаю, что как только у меня появится дамп для стандартного вывода, я смогу его оттуда оттуда.
ОБНОВЛЕНИЕ: Я взломал это достаточно, чтобы решить мою собственную проблему. Мне не удалось понять, что набор данных представляет собой многоассемблер - я думал, что это больше похоже на таблицу db. В маловероятном случае кому-то интересно,
double[,] dataArray = new double[size[0], 6];
var wrapArray = new H5Array<double>(dataArray);
var dataType = H5D.getType(d);
H5D.read(dataset, dataType, wrapArray);
Console.WriteLine(dataArray[0, 0]);