-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathfwdmodel_asl_2compartment.h
56 lines (44 loc) · 1.6 KB
/
fwdmodel_asl_2compartment.h
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
#pragma once
/* fwdmodel_asl_2comparment.h - ASL 2-compartment model
Martin Craig <[email protected]>
Copyright (C) 2017 University of Oxford */
/* CCOPYRIGHT */
#include "fabber_core/fwdmodel.h"
#include <string>
#include <vector>
/**
* ASL 2-compartment model from Parkes and Tofts 2002
*
* This model is now incorporated into aslrest, this code remains as a clean-room
* implementation for comparison purposes only. It may be removed in the future
*/
class ASL2CompartmentModel : public FwdModel
{
public:
static FwdModel *NewInstance();
void Initialize(FabberRunData &args);
void GetOptions(std::vector<OptionSpec> &opts) const;
std::string ModelVersion() const;
std::string GetDescription() const;
void EvaluateModel(const NEWMAT::ColumnVector ¶ms, NEWMAT::ColumnVector &result,
const std::string &key = "") const;
protected:
void GetParameterDefaults(std::vector<Parameter> ¶ms) const;
private:
enum SolutionType
{
DIST,
SLOW,
FAST
};
SolutionType m_sol;
bool m_infer_bat, m_infer_t1, m_infer_t1b, m_infer_t1e;
double m_f_initial, m_sig0;
double m_bat, m_t1, m_t1b, m_t1e, m_ie, m_bolusdur, m_ps, m_vb, m_vbw;
/** Time values of the data volumes - must match number of volumes in data */
std::vector<double> m_times;
double dM(double t, double f, double bat, double t1, double t1b, double t1e) const;
double sig(double sig0, double dm) const;
/** Auto-register with forward model factory. */
static FactoryRegistration<FwdModelFactory, ASL2CompartmentModel> registration;
};