Visualizing HDF5 in Matlab

5 views (last 30 days)
Sebastian Godoy
Sebastian Godoy on 29 Sep 2016
Edited: per isakson on 6 Oct 2016
Hey,
I'm trying to visualize a hdf5 file with matlab. Using this commands to read, store and create an image. Here is my script:
h5info = hdf5info('xlsmask_3155_d_6__Block_0759_Slice_.h5');
dset = hdf5read(h5info.GroupHierarchy.Groups(2).Datasets(1));
image1 = hdf5read('xlsmask_3155_d_6__Block_0759_Slice_.h5',dset);
It just shows me an error in line 3 that I don't understand. Can someone explain me whats wrong?
Cheers, Sebi
  3 Comments
Sebastian Godoy
Sebastian Godoy on 29 Sep 2016
Hey Geoff,
here is the error message showed when a press run:
>> Untitled2
Error using hdf5read>parse_with_dataset (line 116)
The value of 'location' is invalid. It must satisfy the function: ischar.
Error in hdf5read (line 64)
settings = parse_with_dataset(varargin{:});
Error in Untitled2 (line 3)
image1 = hdf5read('xlsmask_3155_d_6__Block_0759_Slice_.h5',dset);
per isakson
per isakson on 6 Oct 2016
Edited: per isakson on 6 Oct 2016
Did you inspect the value of your variable dset?
It is actually the value that you expect image1 to take.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!