-
Notifications
You must be signed in to change notification settings - Fork 2
/
performanceCharacteristics.cpp
99 lines (81 loc) · 2.94 KB
/
performanceCharacteristics.cpp
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
#include <stdio.h>
#include <iostream>
#include "spatialResolution.h"
#include "sensitivity.h"
#include "necr.h"
#include "scatterFraction.h"
#include "contrast.h"
using namespace std;
void performanceCharacteristics();
int main(){
performanceCharacteristics();
return 1;
}
void performanceCharacteristics(){
cout << endl;
cout <<"----------------------------------------------------------"<< endl;
cout <<"----------------------------------------------------------"<< endl;
cout <<" Program to calculate PET detector characteristics "<< endl;
cout <<"----------------------------------------------------------"<< endl;
cout <<" Based on G.B. Saha, Basics of PET Imaging 2010 (Ch 6) "<< endl;
cout <<"----------------------------------------------------------"<< endl;
cout <<" Dr Gary Smith [email protected] 20/09/17 "<< endl;
cout <<"----------------------------------------------------------"<< endl;
cout << endl;
int option = 0;
cout << " Choose a quantity to calculate " << endl;
cout << " ------------------------------ " << endl;
cout << " Spacial Resolution (1) " << endl;
cout << " Sensitivity (2) " << endl;
cout << " Noise Equivalent Count Rate (3)" << endl;
cout << " Scatter Fraction (4) " << endl;
cout << " Contrast (5) " << endl;
cout << " All (6) " << endl;
cout << " ------------------------------ " << endl;
cout << " Input option: "; cin >> option;
cout << " ------------------------------ " << endl;
switch(option) {
case 1: {
calculateSpatialResolution();
break;
}
case 2:{
calculateSensitivity();
break;
}
case 3:{
calculateNECR();
break;
}
case 4:{
calculateScatterFraction();
break;
}
case 5:{
calculateContrast();
break;
}
case 6:{
float spRe = calculateSpatialResolution();
float sens = calculateSensitivity();
float necr = calculateNECR();
float scFr = calculateScatterFraction();
float cont = calculateContrast();
cout <<"--------------------------------------------------------"<< endl;
cout <<" Results Summary "<< endl;
cout <<"--------------------------------------------------------"<< endl;
cout <<" Spacial Resolution " << spRe << " mm "<< endl;
cout <<" Sensitivity " << sens << " cps / kBq "<< endl;
cout <<" Noise Equivalent Count Rate " << necr << " cps "<< endl;
cout <<" Scatter Fraction " << scFr << " "<< endl;
cout <<" Contrast " << cont << " "<< endl;
cout <<"--------------------------------------------------------"<< endl;
cout <<"--------------------------------------------------------"<< endl;
break;
}
default:{
cout << " Invalid option " << endl;
break;
}
}
}