diff options
author | Thomas White <taw@physics.org> | 2009-11-12 18:50:14 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2009-11-12 18:50:14 +0100 |
commit | 857cc8c991a5ee4e717d01822da271ae34f5adaa (patch) | |
tree | 891d9f6e63370871726fe78d23d8b6e3796d92fc /src/hdf5-file.c | |
parent | c9a551b872ae4eb16a606d46a7cf118af24f75f5 (diff) |
Add 'detector' module
Diffstat (limited to 'src/hdf5-file.c')
-rw-r--r-- | src/hdf5-file.c | 6 |
1 files changed, 3 insertions, 3 deletions
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"); |