aboutsummaryrefslogtreecommitdiff
path: root/src/control.h
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-02-05 21:12:57 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-02-05 21:12:57 +0000
commit05b5d261682b9136fb46476a64eab6980b0dba64 (patch)
treed7faa450b69cf2104ffff7fc89a95914284d23af /src/control.h
Initial import
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@1 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/control.h')
-rw-r--r--src/control.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/src/control.h b/src/control.h
new file mode 100644
index 0000000..0493757
--- /dev/null
+++ b/src/control.h
@@ -0,0 +1,94 @@
+/*
+ * control.h
+ *
+ * Common control structure
+ *
+ * (c) 2007 Thomas White <taw27@cam.ac.uk>
+ * dtr - Diffraction Tomography Reconstruction
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifndef CONTROL_H
+#define CONTROL_H
+
+#include <gtk/gtk.h>
+
+typedef enum ift_enum {
+ INPUT_NONE,
+ INPUT_QDRP,
+ INPUT_MRC
+} InputFileType;
+
+typedef enum {
+ FORMULATION_CLEN,
+ FORMULATION_PIXELSIZE
+} FormulationMode;
+
+typedef enum {
+ PEAKSEARCH_THRESHOLD,
+ PEAKSEARCH_ADAPTIVE_THRESHOLD,
+ PEAKSEARCH_LSQ,
+ PEAKSEARCH_ZAEFFERER
+} PeakSearchMode;
+
+typedef enum {
+ RECONSTRUCTION_MAPPING,
+ RECONSTRUCTION_PREDICTION
+} ReconstructionMode;
+
+typedef struct cctx_struct {
+
+ /* Modes */
+ InputFileType inputfiletype;
+ FormulationMode fmode;
+ ReconstructionMode rmode;
+ PeakSearchMode psmode;
+
+ /* Input filename */
+ char *filename;
+
+ /* Basic parameters */
+ 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;
+
+ /* Miscellaneous modes and operations */
+ 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;
+
+ /* Information about the input images */
+ unsigned int n_images;
+
+
+ /* Output */
+ struct rctx_struct *reflectionctx;
+
+ /* GTK bits */
+ GtkWidget *combo_algorithm;
+ GtkWidget *combo_peaksearch;
+
+} ControlContext;
+
+extern ControlContext *control_read(const char *filename);
+
+#endif /* CONTROL_H */