From 857cc8c991a5ee4e717d01822da271ae34f5adaa Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 12 Nov 2009 18:50:14 +0100 Subject: Add 'detector' module --- src/hdf5-file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hdf5-file.c') diff --git a/src/hdf5-file.c b/src/hdf5-file.c index 6eb84aeb..459f285c 100644 --- a/src/hdf5-file.c +++ b/src/hdf5-file.c @@ -22,7 +22,7 @@ #include "image.h" -int hdf5_write(const char *filename, const double *data, +int hdf5_write(const char *filename, const uint16_t *data, int width, int height) { hid_t fh, gh, sh, dh; /* File, group, dataspace and data handles */ @@ -49,7 +49,7 @@ int hdf5_write(const char *filename, const double *data, max_size[1] = height; sh = H5Screate_simple(2, size, max_size); - dh = H5Dcreate(gh, "data", H5T_NATIVE_FLOAT, sh, + dh = H5Dcreate(gh, "data", H5T_NATIVE_UINT16, sh, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); if ( dh < 0 ) { fprintf(stderr, "Couldn't create dataset\n"); @@ -63,7 +63,7 @@ int hdf5_write(const char *filename, const double *data, (int)size[1], (int)size[0], (int)max_size[1], (int)max_size[0]); - r = H5Dwrite(dh, H5T_NATIVE_DOUBLE, H5S_ALL, + r = H5Dwrite(dh, H5T_NATIVE_UINT16, H5S_ALL, H5S_ALL, H5P_DEFAULT, data); if ( r < 0 ) { fprintf(stderr, "Couldn't write data\n"); -- cgit v1.2.3