Initial snark14m import
[snark14.git] / src / snark / bdhk.h
1 /* 
2 ***********************************************************
3 $SNARK_Header: S N A R K  1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4 $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/bdhk.h $
5 $LastChangedRevision: 85 $
6 $Date: 2014-07-02 16:07:08 -0400 (Wed, 02 Jul 2014) $
7 $Author: agulati $
8 ***********************************************************
9 */
10
11
12 #ifndef BDHK_H
13 #define BDHK_H
14
15 #include "alg.h"
16
17   struct NPNR
18   {
19     INTEGER NP;
20     INTEGER NR;
21   };
22
23  
24 class bdhk_class: public alg_class
25 {
26 private:
27 //misl.h
28   
29   REAL AVER(REAL A, REAL B);
30
31   REAL neigSum_General(REAL* recon, REAL* d, int kernel_size);
32
33   REAL AVER3(REAL A, REAL B, REAL C);
34
35   REAL diffAbs(REAL A, REAL B);
36
37   REAL neigSum(REAL* recon, REAL* v);
38
39   void orderRays(struct NPNR* arrayRays, INTEGER kount);
40
41   REAL calcTV(REAL* recon);
42   
43   BOOLEAN calculateGradientTV(REAL* grad, REAL* recon);
44
45   REAL calcHalfNormSquare(REAL* recon);
46
47   REAL calcNorm(REAL* aVector);
48   //calcNorm calculates the square-root of the norm square of a vector ||V||
49   
50   REAL squareNorm(REAL* aVector);
51   //squareNorm calculates the norm square of a vector ||V||^2
52
53   REAL calculateResidual(REAL* recon, INTEGER* list, REAL* weight, struct NPNR* arrayRays, INTEGER kount);
54   //calculates the residual of recon from its pseudo projections
55
56   void MyART(REAL* recon, INTEGER* list, REAL* weight, struct NPNR* arrayRays, INTEGER kount);
57
58
59
60 //algp.h
61    REAL BETA;
62    struct NPNR* arrayRays;
63    INTEGER kount;
64    INTEGER KOUNT; //user paramater to control "STEPS kount" like
65    BOOLEAN flag_kount;
66    INTEGER kernel_size;
67
68 public:
69   INTEGER Init();
70   BOOLEAN Run(REAL* recon, INTEGER* list, REAL* weight, INTEGER iter);
71   INTEGER Reset();
72 };
73
74 #endif