![]() |
libcrystfel 0.13.0
|
Typedefs | |
| typedef struct _stream | Stream |
| typedef struct _streamindex | StreamIndex |
Enumerations | |
| enum | StreamFlags { STREAM_REFLECTIONS = 2 , STREAM_PEAKS = 4 , STREAM_DATA_DETGEOM = 8 } |
Functions | |
| Stream * | stream_open_for_read (const char *filename) |
| Stream * | stream_open_for_write (const char *filename, const DataTemplate *dtempl) |
| Stream * | stream_open_fd_for_write (int fd, const DataTemplate *dtempl) |
| void | stream_close (Stream *st) |
| void | stream_write_data_template (Stream *st, const DataTemplate *dtempl) |
| void | stream_write_geometry_file (Stream *st, const char *geom_filename) |
| void | stream_write_target_cell (Stream *st, UnitCell *cell) |
| void | stream_write_commandline_args (Stream *st, int argc, char *argv[]) |
| void | stream_write_indexing_methods (Stream *st, const char *indm_str) |
| int | stream_has_old_indexers (Stream *st) |
| char * | stream_audit_info (Stream *st) |
| char * | stream_geometry_file (Stream *st) |
| FILE * | stream_get_fh (Stream *st) |
| int | stream_rewind (Stream *st) |
| StreamIndex * | stream_make_index (const char *filename) |
| int | stream_select_chunk (Stream *st, StreamIndex *index, const char *filename, const char *ev) |
| void | stream_index_free (StreamIndex *index) |
| struct image * | stream_read_chunk (Stream *st, StreamFlags srf) |
| int | stream_write_chunk (Stream *st, const struct image *image, StreamFlags srf) |
Stream functions (for indexing results)
| typedef struct _stream Stream |
An opaque structure representing a stream being read or written
| enum StreamFlags |
A bitfield of things that can be read from or written to a stream. Use this together with stream_{read,write}_chunk to read/write the stream faster if you don't need all the information.
General information about crystals (including unit cell parameters) is always read and written.
|
extern |
| fd | File descriptor (e.g. from open()) to use for stream data. |
Creates a new Stream from fd, so that stream data can be written to fd using stream_write_chunk.
In contrast to stream_open_for_write, this function does not write any of the usual headers. This function is mostly for use when multiple substreams need to be multiplexed into a single master stream. The master would be opened using stream_open_for_write, and the substreams using this function.
|
extern |
| filename | Filename of new stream |
| dtempl | A DataTemplate |
Creates a new stream with name filename. If filename already exists, it will be overwritten.
The CrystFEL version number will be written, but you should call stream_write_geometry_file, stream_write_target_cell, stream_write_commandline_args and stream_write_Indexing_methods to write extended audit information.
|
extern |
Read the next chunk from a stream and return an image structure
|
extern |
| st | A Stream |
Attempts to set the file pointer for st to the start of the stream, so that later calls to stream_read_chunk will repeat the sequence of chunks from the start.
Programs must not assume that this operation always succeeds!
|
extern |
| st | A Stream |
| i | An image structure |
| srf | A StreamFlags enum saying what to write |
Writes a new chunk to st.
|
extern |
| st | A Stream |
| argc | number of arguments |
| argv | command-line arguments |
Writes the command line to st. argc and argv should be exactly as were given to main(). This should usually be called immediately after stream_open_for_write.
|
extern |
| st | A Stream |
| geom_filename | geomtry file name |
Writes the content of the geometry file to st. This (or stream_write_geometry_file) should usually be called immediately after write_command.
|
extern |
| st | A Stream |
| geom_filename | geomtry file name |
Writes the content of the geometry file to st. This (or stream_write_data_template) should usually be called immediately after write_command.