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
98
99
100
101
102
103
104
105
106
107
108
109
|
/*
* The PyHST program is Copyright (C) 2002-2011 of the
* European Synchrotron Radiation Facility (ESRF) and
* Karlsruhe Institute of Technology (KIT).
*
* PyHST is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* hst is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _PYHST_SETUP_H
#define _PYHST_SETUP_H
enum HSTChangedT {
HST_FILTER_CHANGED = 1,
HST_PADDING_CHANGED = 2,
HST_LIMITS_CHANGED = 4,
HST_OUTPUT_CHANGED = 8,
HST_ALL_CHANGED = ~0
};
typedef enum HSTChangedT HSTChanged;
enum HSTMethodT {
HST_METHOD_FBP = 1,
HST_METHOD_DFI = 2
};
typedef enum HSTMethodT HSTMethod;
struct HSTSetupT {
// set in PyHST_C
int max_slices; // Maximum slices per iteration
int num_projections; // Number of projections
int num_bins; // Number of bins in sinograms
int start_x; // First X-pixel in region required by user
int start_y; // First Y-pixel in region required by user
int num_x; // Number of X-pixels in reconstruction region
int num_y; // Number of Y-pixels in reconstruction region
float axis_position; // Position of rotation axis
float angle_offset; // Offset rotation angle in radians, could be overriden with custom_angles
float angle_increment; // Angle in radians between each, could be overriden with custom_angles
int zerooffmask;
int no_filtering; // Flag indicates if filtering step should be omited (sinogram is previously filtered)
int oversampling; // 0 = Linear, 1 = Nearest pixel, 2, 3, etc. equal over-sampling factor (respected in CPU mode only, GPU uses linear)
float pente_zone; // slope zone (in fai360 mode)
int sum_rule; // Postprocessing correction depending on difference of per-element sums of sinogram and reconstructed slice
// preprocessing options
float norm; // Normalise parameter
HSTMethod method; // Reconstruction method FBP or DFI
int fft_oversampling; // Oversampling
int dfi_kernel_size;
int dfi_kernel_points;
int END_OF_GLOBAL_PART; // just a label to prevent copying data beyond that point
// set in hst_configure_projections
int fai360; // Indicates if fai360 mode is enabled (projections cover more than two radians)
int *minX, *maxX; // Reconstruction limits (used in zerooffmask mode)
float *cos_s, *sin_s; // Sinuses/cosinuses of projection angles
float *axis_position_corr_s;// Corrected rotational axis positions
float offset_x, offset_y; // offsets of let-top image corner
// set in hst_set_filter
int dim_fft; // Fourier transformation size
float *filter; // Filter
// set in hst_set_padding
int zero_padding; // Type of padding: zeroes or extremums
// set in hst_set_axis_mode
int center_axis; // Flag indicating if axis should be centred in the middle of reconstructed image
HSTChanged what_changed; // List of changed parameters for reconfigure
};
typedef struct HSTSetupT HSTSetup;
# ifdef __cplusplus
extern "C" {
# endif
int hst_setup_init(HSTSetup *ctx);
void hst_setup_free(HSTSetup *ctx);
# ifdef __cplusplus
}
# endif
#endif /* _PYHST_SETUP_H */
|