aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/stream.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-01-30 11:09:57 +0100
committerThomas White <taw@physics.org>2013-01-30 11:09:57 +0100
commit303a4c9e6cdf72dc0164b015a833a2d34cbbba02 (patch)
treeee0a69e8f9da9063f3ea168bd184f6e0d57d57f8 /libcrystfel/src/stream.h
parent9ce39259c3d6bb1b76efbe02f84a4e10a30be13d (diff)
Stream changes
Diffstat (limited to 'libcrystfel/src/stream.h')
-rw-r--r--libcrystfel/src/stream.h32
1 files changed, 11 insertions, 21 deletions
diff --git a/libcrystfel/src/stream.h b/libcrystfel/src/stream.h
index a544798f..db74583d 100644
--- a/libcrystfel/src/stream.h
+++ b/libcrystfel/src/stream.h
@@ -3,11 +3,11 @@
*
* Stream tools
*
- * Copyright © 2012 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2013 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2012 Thomas White <taw@physics.org>
+ * 2010-2013 Thomas White <taw@physics.org>
* 2011 Andrew Aquila
*
* This file is part of CrystFEL.
@@ -38,30 +38,20 @@
struct image;
struct hdfile;
-/* Possible options dictating what goes into the output stream */
-enum
-{
- STREAM_NONE = 0,
- STREAM_INTEGRATED = 1<<0,
- STREAM_PEAKS = 1<<2,
- STREAM_PEAKS_IF_INDEXED = 1<<3,
- STREAM_PEAKS_IF_NOT_INDEXED = 1<<4,
-};
+typedef struct _stream Stream;
+extern Stream *open_stream_for_read(const char *filename);
+extern Stream *open_stream_for_write(const char *filename);
+extern void close_stream(Stream *st);
-extern int count_patterns(FILE *fh);
-
-extern void write_stream_header(FILE *ofh, int argc, char *argv[]);
-
-extern void write_chunk(FILE *ofh, struct image *image, struct hdfile *hdfile,
- int flags);
+extern void write_chunk(Stream *st, struct image *image, struct hdfile *hdfile,
+ int include_peaks, int include_reflections);
-extern int parse_stream_flags(const char *a);
-
-extern int read_chunk(FILE *fh, struct image *image);
+extern int read_chunk(Stream *st, struct image *image);
+/* Nasty functions that should be avoided */
+extern int count_patterns(FILE *fh);
extern int skip_some_files(FILE *fh, int n);
-
extern int is_stream(const char *filename);
#endif /* STREAM_H */