diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-10-19 16:25:08 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-10-19 16:25:08 +0000 |
commit | 45864cb5113ec4dde6afe1d23ea53f75402b9ece (patch) | |
tree | b3d4dad81bcfa34037cb067e1356303b32401df1 /src/image.h | |
parent | 7c4c25f2eda4f0a0780cf2edb087452ceb63f226 (diff) |
Refactor image handling code
Remove itrans-lsq
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@158 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/image.h')
-rw-r--r-- | src/image.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/image.h b/src/image.h new file mode 100644 index 0000000..642cc3a --- /dev/null +++ b/src/image.h @@ -0,0 +1,73 @@ +/* + * image.h + * + * Handle images and image features + * + * (c) 2007 Thomas White <taw27@cam.ac.uk> + * + * dtr - Diffraction Tomography Reconstruction + * + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#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 */ + |