aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-06-08 14:20:14 +0200
committerThomas White <taw@physics.org>2020-07-29 18:53:44 +0200
commitf2de0f8e9a8c520125bbffb13fc11f6fdfc8a1dd (patch)
tree20a589e260e6dd83fa40fa9248ee07f6770079ed /libcrystfel/src/image.c
parent78917049b09ece78834d6309eb3f035e83537d1d (diff)
Add is_hdf5_file
Avoids using HDF5 API calls all over the code
Diffstat (limited to 'libcrystfel/src/image.c')
-rw-r--r--libcrystfel/src/image.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c
index 4b698534..09e1e755 100644
--- a/libcrystfel/src/image.c
+++ b/libcrystfel/src/image.c
@@ -288,7 +288,7 @@ static double get_value(struct image *image, const char *from)
val = strtod(from, &rval);
if ( (*rval == '\0') && (rval != from) ) return val;
- if ( H5Fis_hdf5(image->filename) > 0 ) {
+ if ( is_hdf5_file(image->filename) > 0 ) {
return image_hdf5_get_value(from,
image->filename,
image->ev);
@@ -468,7 +468,7 @@ struct image *image_read(DataTemplate *dtempl, const char *filename,
return NULL;
}
- if ( H5Fis_hdf5(filename) > 0 ) {
+ if ( is_hdf5_file(filename) > 0 ) {
image = image_hdf5_read(dtempl, filename, event);
} else if ( is_cbf_file(filename) > 0 ) {
@@ -536,7 +536,7 @@ struct image *image_read(DataTemplate *dtempl, const char *filename,
} else {
mask_fn = p->mask_file;
}
- if ( H5Fis_hdf5(mask_fn) > 0 ) {
+ if ( is_hdf5_file(mask_fn) > 0 ) {
image_hdf5_read_mask(p, mask_fn, event,
image->bad[i],
dtempl->mask_good,
@@ -636,7 +636,7 @@ ImageFeatureList *image_read_peaks(const DataTemplate *dtempl,
const char *event,
int half_pixel_shift)
{
- if ( H5Fis_hdf5(filename) > 0 ) {
+ if ( is_hdf5_file(filename) > 0 ) {
const char *ext;
ext = filename_extension(filename, NULL);