/tomo/pyhst

To get this branch, use:
bzr branch http://darksoft.org/webbzr/tomo/pyhst
28 by csa
Use pinned result buffer to perform device2host memory transfer parallel with computations, add ESRF copyright information in files appeared after redesign
1
/*
78 by Suren A. Chilingaryan
Add COPYING and fix license statements
2
 * The PyHST program is Copyright (C) 2002-2011 of the
3
 * European Synchrotron Radiation Facility (ESRF) and
4
 * Karlsruhe Institute of Technology (KIT).
28 by csa
Use pinned result buffer to perform device2host memory transfer parallel with computations, add ESRF copyright information in files appeared after redesign
5
 *
6
 * PyHST is free software: you can redistribute it and/or modify it
7
 * under the terms of the GNU General Public License as published by the
8
 * Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 * 
11
 * hst is distributed in the hope that it will be useful, but
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 * See the GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License along
17
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 */
19
18 by csa
Big redesign (early commit)
20
#ifndef _PYHST_SETUP_H
21
#define _PYHST_SETUP_H
22
20 by csa
do more correct initialization
23
enum HSTChangedT {
24
    HST_FILTER_CHANGED = 1,
25
    HST_PADDING_CHANGED = 2,
26
    HST_LIMITS_CHANGED = 4,
27
    HST_OUTPUT_CHANGED = 8,
28
    HST_ALL_CHANGED = ~0
29
};
30
31
typedef enum HSTChangedT HSTChanged;
32
168 by Suren A. Chilingaryan
Placeholders for DFI implementation
33
enum HSTMethodT {
34
    HST_METHOD_FBP = 1,
35
    HST_METHOD_DFI = 2
36
};
37
typedef enum HSTMethodT HSTMethod;
38
20 by csa
do more correct initialization
39
18 by csa
Big redesign (early commit)
40
struct HSTSetupT {
41
	// set in PyHST_C
151 by Suren A. Chilingaryan
Multislice mode: preload into the GPU memory complete slices
42
    int max_slices;             // Maximum slices per iteration 
18 by csa
Big redesign (early commit)
43
    int num_projections;	// Number of projections
44
    int num_bins;		// Number of bins in sinograms
45
46
    int start_x;                // First X-pixel in region required by user
47
    int start_y;                // First Y-pixel in region required by user
48
    int num_x;			// Number of X-pixels in reconstruction region
49
    int num_y;			// Number of Y-pixels in reconstruction region
50
51
    float axis_position;       	// Position of rotation axis
52
    float angle_offset;         // Offset rotation angle in radians, could be overriden with custom_angles
53
    float angle_increment;      // Angle in radians between each, could be overriden with custom_angles
54
55
    int zerooffmask;
56
    int no_filtering;	  	// Flag indicates if filtering step should be omited (sinogram is previously filtered)
57
58
    int oversampling;           // 0 = Linear, 1 = Nearest pixel, 2, 3, etc. equal over-sampling factor  (respected in CPU mode only, GPU uses linear)
59
60
    float pente_zone;		// slope zone (in fai360 mode)
61
    
62
    int sum_rule;		// Postprocessing correction depending on difference of per-element sums of sinogram and reconstructed slice
132 by Suren A. Chilingaryan
Pipelined preprocessing (normalize & transpose)
63
64
        // preprocessing options
65
    float norm;                 // Normalise parameter
18 by csa
Big redesign (early commit)
66
    
168 by Suren A. Chilingaryan
Placeholders for DFI implementation
67
    HSTMethod method;		// Reconstruction method FBP or DFI
68
    int fft_oversampling;	// Oversampling
69
    int dfi_kernel_size;
70
    int dfi_kernel_points;
71
    
18 by csa
Big redesign (early commit)
72
    int END_OF_GLOBAL_PART;	// just a label to prevent copying data beyond that point
73
74
	// set in hst_configure_projections
31 by csa
Build filters and fastedf even if make with argument is called
75
    int fai360;			// Indicates if fai360 mode is enabled (projections cover more than two radians)
18 by csa
Big redesign (early commit)
76
    int *minX, *maxX;		// Reconstruction limits (used in zerooffmask mode)
77
    float *cos_s, *sin_s;	// Sinuses/cosinuses of projection angles
78
    float *axis_position_corr_s;// Corrected rotational axis positions
79
    float offset_x, offset_y;	// offsets of let-top image corner
80
81
	// set in hst_set_filter
82
    int dim_fft;		// Fourier transformation size
83
    float *filter;		// Filter
84
	
85
	// set in hst_set_padding
86
    int zero_padding;		// Type of padding: zeroes or extremums
87
    
88
	// set in hst_set_axis_mode
89
    int center_axis;		// Flag indicating if axis should be centred in the middle of reconstructed image
90
132 by Suren A. Chilingaryan
Pipelined preprocessing (normalize & transpose)
91
92
20 by csa
do more correct initialization
93
    HSTChanged what_changed;	// List of changed parameters for reconfigure
18 by csa
Big redesign (early commit)
94
};
95
typedef struct HSTSetupT HSTSetup;
96
97
98
# ifdef __cplusplus
99
extern "C" {
100
# endif
101
102
int hst_setup_init(HSTSetup *ctx);
103
void hst_setup_free(HSTSetup *ctx);
104
105
# ifdef __cplusplus
106
}
107
# endif
108
109
#endif /* _PYHST_SETUP_H */