aboutsummaryrefslogtreecommitdiff
path: root/src/control.h
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-08-19 23:13:58 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-08-19 23:13:58 +0000
commitb31565d11bcb28ca33b4a51cb363549c46444cd8 (patch)
tree59c573a21eaae8c8e82f5491d7167ff0c854ae95 /src/control.h
parentde770d8c43a57b1941e2f6942f75deb8c99475aa (diff)
Preparation for handing precessed data
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@65 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/control.h')
-rw-r--r--src/control.h76
1 files changed, 47 insertions, 29 deletions
diff --git a/src/control.h b/src/control.h
index ed9e128..4566315 100644
--- a/src/control.h
+++ b/src/control.h
@@ -4,6 +4,7 @@
* Common control structure
*
* (c) 2007 Thomas White <taw27@cam.ac.uk>
+ *
* dtr - Diffraction Tomography Reconstruction
*
*/
@@ -16,6 +17,9 @@
#define CONTROL_H
#include <gtk/gtk.h>
+#include <inttypes.h>
+
+#define MAX_IMAGES 256
typedef enum ift_enum {
INPUT_NONE,
@@ -43,55 +47,69 @@ typedef enum {
RECONSTRUCTION_PREDICTION
} ReconstructionMode;
+typedef struct imagerecord_struct {
+
+ int16_t *image;
+ double tilt;
+ double omega;
+ double pixel_size;
+ double camera_len;
+ int width;
+ int height;
+
+} ImageRecord;
+
typedef struct cctx_struct {
/* Modes */
- InputFileType inputfiletype;
- FormulationMode fmode;
- ReconstructionMode rmode;
- PeakSearchMode psmode;
-
+ InputFileType inputfiletype;
+ FormulationMode fmode;
+ ReconstructionMode rmode;
+ PeakSearchMode psmode;
+
/* Input filename */
- char *filename;
+ char *filename;
/* Basic parameters */
- double camera_length;
- double omega;
- double resolution;
- double lambda;
- double pixel_size;
+ double camera_length;
+ double omega;
+ double resolution;
+ double lambda;
+ double pixel_size;
/* (QDRP) Parser flags */
- unsigned int started;
- unsigned int camera_length_set;
- unsigned int omega_set;
- unsigned int max_d_set;
- unsigned int resolution_set;
- unsigned int lambda_set;
+ unsigned int started;
+ unsigned int camera_length_set;
+ unsigned int omega_set;
+ unsigned int max_d_set;
+ unsigned int resolution_set;
+ unsigned int lambda_set;
/* Miscellaneous modes and operations */
- unsigned int max_d;
- unsigned int first_image;
+ unsigned int max_d;
+ unsigned int first_image;
/* Size of input images - assumed the same throughout. */
- unsigned int width;
- unsigned int height;
- unsigned int x_centre;
- unsigned int y_centre;
+ int width;
+ int height;
+ int x_centre;
+ int y_centre;
/* Information about the input images */
- unsigned int n_images;
-
+ int n_images;
+ ImageRecord images[MAX_IMAGES];
/* Output */
- struct rctx_struct *reflectionctx;
+ struct rctx_struct *reflectionctx;
/* GTK bits */
- GtkWidget *combo_algorithm;
- GtkWidget *combo_peaksearch;
+ GtkWidget *combo_algorithm;
+ GtkWidget *combo_peaksearch;
} ControlContext;
-extern ControlContext *control_read(const char *filename);
+extern int control_add_image_ps(ControlContext *ctx, int16_t *image, int width, int height, double tilt, double omega, double pixel_size);
+extern int control_add_image_cl(ControlContext *ctx, int16_t *image, int width, int height, double tilt, double omega, double camera_len);
#endif /* CONTROL_H */
+