JEMRIS  2.8.2
open-source MRI simulations
Trajectory.h
Go to the documentation of this file.
1 
9 /*
10  * JEMRIS Copyright (C)
11  * 2006-2018 Tony Stoecker
12  * 2007-2018 Kaveh Vahedipour
13  * 2009-2018 Daniel Pflugfelder
14  *
15  *
16  * This program is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation; either version 2 of the License, or
19  * (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with this program; if not, write to the Free Software
28  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29  */
30 
31 #ifndef TRAJECTORY_H_
32 #define TRAJECTORY_H_
33 
34 #include <string>
35 #include <iostream>
36 using namespace std;
38 
39 
43 class Trajectory {
44 private:
45  TrajectoryInterface *m_strategy;
46 
47 public:
48  Trajectory(TrajectoryInterface *strategy):m_strategy(strategy) {}
49 
50  void GetValue(double time, double *value);
51 //MODIF
52  void GetValue(double time, double *value, long currentSpin);
53 
54  void FlowLoop(double loopDuration,long loopTrajNumber);
55 
56  bool spinActivation(long currentSpin);
57 //MODIF***
58  void LoadFile(string filename);
59 
60  void SetStrategy(TrajectoryInterface *new_strategy) {m_strategy = new_strategy;};
61 
62  void UpdateTrajectory(bool init=false);
63 
64  TrajectoryInterface* GetStrategy(){cout << "THIS IS A DEBUG FUNCTION!" <<endl; return m_strategy;};
65 };
66 
67 #endif /* TRAJECTORY_H_ */
pure virtual base class for all Trajectories
Definition: TrajectoryInterface.h:48
Context class for trajectories (design pattern: Strategy)
Definition: Trajectory.h:43

-- last change 24.05.2018 | Tony Stoecker | Imprint | Data Protection --