2011年4月9日土曜日

open hdf5 file

PRO a

;File = FILEPATH('1.h5', ROOT_DIR='G:\img\')
;Result = H5_BROWSER(File)

; Open the HDF5 file.
file = FILEPATH('1.h5', ROOT_DIR='G:\img\')
file_id = H5F_OPEN(file)

; Open the image dataset within the file.
; This is located within the /images group.
; We could also have used H5G_OPEN to open up the group first.
dataset_id1 = H5D_OPEN(file_id, '/Data/NDVI/NDVI')

; Read in the actual image data.
image = H5D_READ(dataset_id1)

; Close all our identifiers so we don't leak resources.
H5D_CLOSE, dataset_id1
H5F_CLOSE, file_id

; Display the data.
DEVICE, DECOMPOSED=0

; Use /ORDER since the image is stored top-to-bottom.
TV, image, /ORDER

END

0 件のコメント: