How can I import a lzf compressed HDF5 dataset in Matlab?
27 ビュー (過去 30 日間)
古いコメントを表示
Hello I try to open a lzf compressed HDF5 dataset in Matlab with h5read but I only get the below error.
Error using h5readc
The HDF5 library encountered an error and produced the following
stack trace information:
H5PL__find can't open directory
H5PL_load search in paths failed
H5Z_pipeline required filter 'lzf' is not registered
H5D__chunk_lock data pipeline read failed
H5D__chunk_read unable to read raw data chunk
H5D__read can't read data
H5Dread can't read data
Error in h5read (line 58)
[data,var_class] = h5readc(Filename,Dataset,start,count,stride);||
I also tried hdf5read but the same...
Error using hdf5readc
Reading from the dataset failed.
Error in hdf5read (line 95)
[data, attributes] = hdf5readc(settings.filename, ...
Does anybody has a good idea how to access lzf compressed datasets in hdf5 files? Thank you
0 件のコメント
採用された回答
Harish Ramachandran
2018 年 4 月 12 日
As of R2015a, MATLAB upgraded to HDF5 1.8.12 and thus now supports reading HDF5 datasets via the new dynamically loaded filter feature (which includes LZF compression).
To use a custom filter, you must have the third-party filter as a shared library or DLL on your system and then set the HDF5_PLUGIN_PATH environment variable to point to the shared libraries. Note that if you are using Windows, there may be additional steps required to ensure compatibility between the CRT (C Run-time Libraries) of the Visual Studio builds of HDF5 and the third-party filter.
For releases prior to R2015a, MATLAB does not support LZF compression filters.
The high-level functions can be used to read HDF5 files with compression filters. To return information about the compression filter used, and other metadata about the file, use ' h5info'. To read the file, assuming that the compression filter used is supported by MATLAB, call ' h5read', and the decompression will be done automatically.
0 件のコメント
その他の回答 (3 件)
Suzanne Onstwedder
2020 年 5 月 2 日
編集済み: Suzanne Onstwedder
2020 年 5 月 5 日
Install Microsoft C++ runtime environment
- Make sure you have the latest Microsoft C++ runtime environment installed. (Go to https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads for the appropriate installer).
- Just install it the normal way, following the prompt instructions.
Install third party LZF plugin
- Download the plugin (all the way at the bottom) from https://www.hdfgroup.org/downloads/hdf5/
- Open and install the ‘h5pl-1.12.0-win64.msi’file.
- Just install it the normal way, following the prompt instructions. If you install it in an alternative location, copy that path. Standard is ‘C:\Program Files\HDF_Group\HDF5\1.12.0’
Add HDF5_plugin_path to windows
- Open Control panel
- Open system and security
- Open system
- Open Advanced settings, located in the most left column
- Click ‘Environment variables’ (‘omgevingsvariabelen’)
- Click the Top ‘New’ and add exactly the same following three variables (See image)
- For copy purpose C:\Program Files\HDF_Group\HDF5\1.12.0\lib\plugin
Restart matlab
0 件のコメント
Reynaud Lucile
2019 年 9 月 12 日
Hello,
I have the same question as Gerrit H, I would like to open a lzf compressed HDF5 file.
My MATLAB is the 2019 version so it should be able to open LZF compressions according to your answer.
Error using h5readc
The HDF5 library encountered an error and produced the following stack trace
information:
H5PL__find can't open directory
H5PL_load search in paths failed
H5Z_pipeline required filter 'lzf' is not registered
H5D__chunk_lock data pipeline read failed
H5D__chunk_read unable to read raw data chunk
H5D__read can't read data
H5Dread can't read data
Error in h5read (line 66)
[data,var_class] = h5readc(Filename,Dataset,start,count,stride);
I went on the website for the lzf librairy http://oldhome.schmorp.de/marc/liblzf.html . I downloaded their content liblzf-3.6.tar.gz.sig but I don't know how to install it on MATLAB. How can we install that library ? And how can we add it to HDF5_PLUGIN_PATH environment variable ?
Thank you
2 件のコメント
Torbjörn Pettersson
2020 年 10 月 11 日
Did you solve the above issue?
I have encountered the same problem...
Cheers,
Torbjörn
saurabh pegwal
2021 年 11 月 25 日
編集済み: saurabh pegwal
2021 年 11 月 25 日
1). you just need to install the third party LZF plugin as explained above.
Lorenza Sala
2022 年 1 月 27 日
Hello,
I have the same problem, but for a different filter (blosc filter). The filter is included in the dynamically loaded filter feature. But I am working on Mac OS and I don't know how to download and install the feature on my machine. Can anyone help me with this?
Thanks
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!