| MATLAB Central > MATLAB Newsreader > reading HDF5 dataset subset |
|
|
|
Using the low-level HDF5 functions in Matlab, I have generated some HDF5 files with several datasets that are each 512x512x1410. I need to be able to read subsets of these different layers. Looks like hdf5read does not have subsetting capabilities like hdfread, so I am guessing I need to use low-level functions such as H5D.read. How do I translate something like the following high level hdfread call into those HDF5 low-level functions?: |
|
Subject: reading HDF5 dataset subset From: Ashish Uthama Date: 3 Nov, 2009 12:22:26 Message: 2 of 12 |
|
On Mon, 02 Nov 2009 17:15:21 -0500, Tess <tess.brandon@noaa.gov> wrote: |
|
Subject: reading HDF5 dataset subset From: Ashish Uthama Date: 3 Nov, 2009 12:24:02 Message: 3 of 12 |
|
On Tue, 03 Nov 2009 07:22:26 -0500, Ashish Uthama |
|
Subject: reading HDF5 dataset subset From: Ashish Uthama Date: 3 Nov, 2009 12:27:58 Message: 4 of 12 |
|
On Tue, 03 Nov 2009 07:22:26 -0500, Ashish Uthama |
|
Thanks; I've seen these examples but haven't been able to get them to apply to my problem successfully. Is 'hyperslab' just a fancy word for subset or chunk of the data? Does it matter at all how the data set is chunked? |
|
Subject: reading HDF5 dataset subset From: Ashish Uthama Date: 3 Nov, 2009 20:10:23 Message: 6 of 12 |
|
On Tue, 03 Nov 2009 14:11:03 -0500, Tess <tess.brandon@noaa.gov> wrote: |
|
I think you hit on it with #4 -- I didn't know how to set the memory space. |
|
I just ran your code and realized that while you defined the memory space to be rank 3, [x y z], the output is only one value. The way you've defined start, stride and count, you should have ended up with a 1x3 vector. I need to be able to subset, say, a [1x512x512] slice of data. |
|
Subject: reading HDF5 dataset subset From: Ashish Uthama Date: 3 Nov, 2009 21:11:07 Message: 9 of 12 |
|
On Tue, 03 Nov 2009 15:55:17 -0500, Tess <tess.brandon@noaa.gov> wrote: |
|
Subject: reading HDF5 dataset subset From: Ashish Uthama Date: 3 Nov, 2009 21:19:27 Message: 10 of 12 |
|
On Tue, 03 Nov 2009 16:09:01 -0500, Tess <tess.brandon@noaa.gov> wrote: |
|
Yes! Done. Thank you. |
|
Subject: reading HDF5 dataset subset From: Ashish Uthama Date: 4 Nov, 2009 13:36:42 Message: 12 of 12 |
|
On Tue, 03 Nov 2009 16:48:02 -0500, Tess <tess.brandon@noaa.gov> wrote: |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| hdf5 | Tess | 2 Nov, 2009 17:19:04 |
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.
Contact us at files@mathworks.com