blob: ed9e128ed452a7f625d2719a854a454d2c478da9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/*
* 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,
INPUT_CACHE
} InputFileType;
typedef enum {
FORMULATION_CLEN,
FORMULATION_PIXELSIZE
} FormulationMode;
typedef enum {
PEAKSEARCH_NONE,
PEAKSEARCH_THRESHOLD,
PEAKSEARCH_ADAPTIVE_THRESHOLD,
PEAKSEARCH_LSQ,
PEAKSEARCH_ZAEFFERER,
PEAKSEARCH_STAT
} 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 */
|