libcrystfel  0.10.1
Data Structures | Macros | Typedefs | Enumerations | Functions
image.h File Reference

Data Structures

struct  imagefeature
 
struct  header_cache_entry
 
struct  image
 

Macros

#define HEADER_CACHE_SIZE   (128)
 

Typedefs

typedef struct _imagefeaturelist ImageFeatureList
 

Enumerations

enum  HeaderCacheType {
  HEADER_FLOAT,
  HEADER_INT,
  HEADER_STR
}
 
enum  DataSourceType {
  DATA_SOURCE_TYPE_UNKNOWN,
  DATA_SOURCE_TYPE_NONE,
  DATA_SOURCE_TYPE_HDF5,
  DATA_SOURCE_TYPE_CBF,
  DATA_SOURCE_TYPE_CBFGZ,
  DATA_SOURCE_TYPE_MSGPACK
}
 

Functions

ImageFeatureListimage_feature_list_new (void)
 
void image_feature_list_free (ImageFeatureList *flist)
 
void image_add_feature (ImageFeatureList *flist, double x, double y, int pn, struct image *parent, double intensity, const char *name)
 
void image_remove_feature (ImageFeatureList *flist, int idx)
 
struct imagefeatureimage_feature_closest (ImageFeatureList *flist, double fs, double ss, int pn, double *d, int *idx)
 
int image_feature_count (ImageFeatureList *flist)
 
struct imagefeatureimage_get_feature (ImageFeatureList *flist, int idx)
 
const struct imagefeatureimage_get_feature_const (const ImageFeatureList *flist, int idx)
 
ImageFeatureListsort_peaks (ImageFeatureList *flist)
 
ImageFeatureListimage_feature_list_copy (const ImageFeatureList *flist)
 
void image_add_crystal (struct image *image, Crystal *cryst)
 
int remove_flagged_crystals (struct image *image)
 
void free_all_crystals (struct image *image)
 
void mark_resolution_range_as_bad (struct image *image, double min, double max)
 
struct imageimage_new (void)
 
struct imageimage_read (const DataTemplate *dtempl, const char *filename, const char *event, int no_image_data, int no_mask_data)
 
struct imageimage_create_for_simulation (const DataTemplate *dtempl)
 
struct imageimage_read_data_block (const DataTemplate *dtempl, void *data_block, size_t data_block_size, DataSourceType type, int serial, int no_image_data, int no_mask_data)
 
void image_free (struct image *image)
 
int image_read_header_float (struct image *image, const char *from, double *val)
 
void image_cache_header_float (struct image *image, const char *header_name, double header_val)
 
void image_cache_header_int (struct image *image, const char *header_name, int header_val)
 
void image_cache_header_str (struct image *image, const char *header_name, const char *header_val)
 
ImageFeatureListimage_read_peaks (const DataTemplate *dtempl, const char *filename, const char *event, int half_pixel_shift)
 
char ** image_expand_frames (const DataTemplate *dtempl, const char *filename, int *nframes)
 
int image_set_zero_data (struct image *image, const DataTemplate *dtempl)
 
int image_set_zero_mask (struct image *image, const DataTemplate *dtempl)
 
int image_write (const struct image *image, const DataTemplate *dtempl, const char *filename)
 
int create_detgeom (struct image *image, const DataTemplate *dtempl)
 

Detailed Description

Information about images

Typedef Documentation

◆ ImageFeatureList

typedef struct _imagefeaturelist ImageFeatureList

An opaque type representing a list of image features

Function Documentation

◆ image_create_for_simulation()

struct image* image_create_for_simulation ( const DataTemplate dtempl)

Create an image structure, suitable for simulation.

WARNING: This is probably not the routine you are looking for! If you use this routine anywhere other than a simulation program, then you are abusing the API and can expect breakage. In particular, your program will only work when the experiment is completely described by the DataTemplate, with no values whatsoever coming from image headers.

Returns
the new image structure.

◆ sort_peaks()

ImageFeatureList* sort_peaks ( ImageFeatureList flist)

Strongest first.