/* * image.h * * Handle images and image features * * (c) 2007 Thomas White * * dtr - Diffraction Tomography Reconstruction * */ #ifdef HAVE_CONFIG_H #include #endif #ifndef IMAGE_H #define IMAGE_H #include "control.h" typedef struct imagefeature_struct { struct imagerecord_struct *parent; int x; int y; double intensity; } ImageFeature; typedef struct { ImageFeature *features; int n_features; } ImageFeatureList; typedef struct imagerecord_struct { uint16_t *image; double tilt; /* Degrees. Defines where the pattern lies in reciprocal space */ double omega; /* Degrees. Defines where the pattern lies in reciprocal space */ double slop; /* Degrees. Defines where the pattern lies "on the negative" */ FormulationMode fmode; double pixel_size; double camera_len; double lambda; double resolution; int width; int height; int x_centre; int y_centre; ImageFeatureList *features; } ImageRecord; typedef struct imagelist_struct { int n_images; ImageRecord *images; } ImageList; extern ImageList *image_list_new(void); extern int image_add(ImageList *list, uint16_t *image, int width, int height, double tilt, ControlContext *ctx); extern ImageFeatureList *image_feature_list_new(void); extern void image_feature_list_free(ImageFeatureList *flist); extern void image_add_feature(ImageFeatureList *flist, double x, double y, ImageRecord *parent, double intensity); #endif /* IMAGE_H */