aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image-hdf5.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/image-hdf5.c')
-rw-r--r--libcrystfel/src/image-hdf5.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c
index cbbc3012..7898d06b 100644
--- a/libcrystfel/src/image-hdf5.c
+++ b/libcrystfel/src/image-hdf5.c
@@ -543,9 +543,7 @@ static int load_hdf5_hyperslab(struct panel_template *p,
int image_hdf5_read(struct image *image,
- const DataTemplate *dtempl,
- const char *filename,
- const char *event)
+ const DataTemplate *dtempl)
{
int i;
@@ -555,16 +553,16 @@ int image_hdf5_read(struct image *image,
return 1;
}
- if ( event == NULL ) {
- event = "//";
+ if ( image->ev == NULL ) {
+ image->ev = "//";
}
/* Set all pointers to NULL for easier clean-up */
for ( i=0; i<dtempl->n_panels; i++ ) image->dp[i] = NULL;
for ( i=0; i<dtempl->n_panels; i++ ) {
- if ( load_hdf5_hyperslab(&dtempl->panels[i], filename,
- event, (void *)&image->dp[i],
+ if ( load_hdf5_hyperslab(&dtempl->panels[i], image->filename,
+ image->ev, (void *)&image->dp[i],
H5T_NATIVE_FLOAT,
sizeof(float), 0,
dtempl->panels[i].data) )
@@ -574,9 +572,6 @@ int image_hdf5_read(struct image *image,
}
}
- image->filename = strdup(filename);
- image->ev = safe_strdup(event);
-
return 0;
}