We will pick out only the central portion of the image. dataspace_id = H5D_GET_SPACE(dataset_id1) Now choose our hyperslab. dataset_id1 = H5D_OPEN(file_id, '/images/Eskimo') Open up the dataspace associated with the Eskimo image. file = FILEPATH( 'hdf5_test.h5', $ SUBDIRECTORY=) file_id = H5F_OPEN(file) Open the image dataset within the file. PRO ex_read_hdf5_select Open the HDF5 file. The following example reads only a portion of the previous image, using the dataspace keywords to H5D_READ. TV, image, /ORDER END Reading a Subselection DEVICE, DECOMPOSED= 0 WINDOW, XSIZE=dimensions, YSIZE=dimensions TVLCT, palette, palette, palette Use /ORDER since the image is stored top-to-bottom. H5S_CLOSE, dataspace_id H5D_CLOSE, dataset_id1 H5D_CLOSE, dataset_id2 H5F_CLOSE, file_id Display the data. dataset_id2 = H5D_OPEN(file_id, '/images/Eskimo_palette') palette = H5D_READ(dataset_id2) Close all our identifiers so we don't leak resources. dimensions = H5S_GET_SIMPLE_EXTENT_DIMS(dataspace_id) Now open and read the color palette associated with this image. dataspace_id = H5D_GET_SPACE(dataset_id1) Retrieve the dimensions so we can set the window size. image = H5D_READ(dataset_id1) Open up the dataspace associated with the Eskimo image. dataset_id1 = H5D_OPEN(file_id, '/images/Eskimo') Read in the actual image data. We could also have used H5G_OPEN to open up the group first. This is located within thhtml/images group. It is assumed that the user already knows the dataset name, either from using h5dump, or the H5G_GET_MEMBER_NAME function. The following example opens up the hdf5_test.h5 file and reads in a sample image. HDF attributes are small named datasets that are attached to primary datasets, groups, or named datatypes.