From 6295abd6cccf2b12dac2f3af03f55fba6a8700aa Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 17 Oct 2014 17:20:23 +0200 Subject: Read image serial number back --- libcrystfel/src/stream.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/stream.c b/libcrystfel/src/stream.c index 8d61ba49..3be9dae5 100644 --- a/libcrystfel/src/stream.c +++ b/libcrystfel/src/stream.c @@ -919,6 +919,7 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf) do { long long num_peaks; + int ser; float div, bw; rval = fgets(line, 1023, st->fh); @@ -958,6 +959,10 @@ int read_chunk_2(Stream *st, struct image *image, StreamReadFlags srf) image->num_peaks = num_peaks; } + if ( sscanf(line, "Image serial number: %i", &ser) == 1 ) { + image->serial = ser; + } + if ( strncmp(line, "camera_length_", 14) == 0 ) { if ( image->det != NULL ) { -- cgit v1.2.3