STIR  6.2.0
PinholeSPECTUB_Weight3d.h
1 /*
2  Copyright (C) 2022, Matthew Strugari
3  Copyright (C) 2014, Biomedical Image Group (GIB), Universitat de Barcelona, Barcelona, Spain. All rights reserved.
4  Copyright (C) 2014, 2021, University College London
5  This file is part of STIR.
6 
7  This software is distributed WITHOUT ANY WARRANTY;
8  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 
10  See STIR/LICENSE.txt for details
11 
12  \author Carles Falcon
13  \author Matthew Strugari
14 */
15 
16 #ifndef _WEIGHT3D_SPECT_mph_H
17 #define _WEIGHT3D_SPECT_mph_H
18 
19 namespace SPECTUB_mph
20 {
21 
22 void wm_calculation_mph(bool do_estim,
23  const int kOS,
24  psf2d_type* psf2d_bin,
25  psf2d_type* psf_subs,
26  psf2d_type* psf2d_aux,
27  psf2d_type* kern,
28  float* attmap,
29  bool* msk_3d,
30  int* Nitems,
31  wmh_mph_type& wmh,
32  wm_da_type& wm,
33  pcf_type& pcf);
34 
35 //... geometric component ............................................
36 
37 bool check_xang_par(voxel_type* vox, hole_type* h);
38 
39 bool check_zang_par(voxel_type* vox, hole_type* h);
40 
41 // bool check_xang_obl( lor_type * l, voxel_type * vox, hole_type * h);
42 
43 // bool check_zang_obl( lor_type * l, voxel_type * vox, hole_type * h);
44 
45 void voxel_projection_mph(lor_type* l, voxel_type* v, hole_type* h, wmh_mph_type& wmh);
46 
47 void fill_psfi(psf2d_type* kern, wmh_mph_type& wmh);
48 
49 void downsample_psf(psf2d_type* psf_in, psf2d_type* psf_out, int factor, bool do_calc);
50 
51 void psf_convol(psf2d_type* psf1, psf2d_type* psf_aux, psf2d_type* psf2, bool do_calc);
52 
53 float bresenh_f(int i1, int j1, int i2, int j2, float** f, int imax, int jmax, float dcr, wmh_mph_type& wmh, pcf_type& pcf);
54 
55 void fill_psf_geo(psf2d_type* psf2d, lor_type* l, discrf2d_type* f, int factor, bool do_calc, wmh_mph_type& wmh);
56 
57 void fill_psf_depth(psf2d_type* psf2d, lor_type* l, discrf2d_type* f, int factor, bool do_calc, wmh_mph_type& wmh, pcf_type& pcf);
58 
59 void psf_convol(psf2d_type* psf2d, psf2d_type* psf_aux, psf2d_type* kern);
60 
61 void downsample_psf(psf2d_type* psf_subs, psf2d_type* psf_bin);
62 
63 //... attenuation...................................................
64 
65 float calc_att_mph(bin_type bin, voxel_type vox, float* attmap, wmh_mph_type& wmh);
66 
67 int comp_dist(float dx, float dy, float dz, float dlast);
68 
69 void error_weight3d(int nerr, std::string txt); // error messages in weight3d_SPECT
70 
71 } // namespace SPECTUB_mph
72 
73 #endif
Definition: PinholeSPECTUB_Tools.h:22