21 #include <odinpara/odinpara.h>
30 enum plotChannel {B1re_plotchan=0, B1im_plotchan, rec_plotchan, signal_plotchan, freq_plotchan, phase_plotchan, Gread_plotchan, Gphase_plotchan, Gslice_plotchan, numof_plotchan};
32 enum markType {no_marker=0, exttrigger_marker, halttrigger_marker, snapshot_marker, reset_marker, acquisition_marker, endacq_marker, excitation_marker, refocusing_marker, storeMagn_marker, recallMagn_marker, inversion_marker, saturation_marker, numof_markers };
33 static const char* markLabel[]={ODIN_NONE_STR,
"exttrigger",
"halttrigger",
"snapshot",
"reset",
"acquisition",
"endacq",
"excitation",
"refocusing",
"storeMagn",
"recallMagn",
"inversion",
"saturation" };
34 AVOID_CC_WARNING(markLabel)
36 enum timecourseMode {tcmode_curves=0, tcmode_plain, tcmode_slew_rate, tcmode_kspace, tcmode_M1, tcmode_M2, tcmode_b_trace, tcmode_backgr_kspace, tcmode_backgr_crossterm, tcmode_eddy_currents, numof_tcmodes};
37 static const char* timecourseLabel[]= {
"Curves",
"Plain",
"Slew Rate",
"k-Space",
"1st Grad. Moment",
"2nd Grad. Moment",
"b-Value Trace",
"Backgr. k-Space",
"Backgr. Crossterm",
"Eddy Currents"};
38 static const char* timecoursePrefix[]={
"G",
"G",
"dG",
"k",
"M1",
"M2",
"b",
"k",
"c",
"G"};
39 static const char* timecourseUnit[]= {ODIN_GRAD_UNIT, ODIN_GRAD_UNIT, ODIN_GRAD_UNIT
"/" ODIN_TIME_UNIT,
"rad/" ODIN_SPAT_UNIT,
"rad*" ODIN_TIME_UNIT
"/" ODIN_SPAT_UNIT,
"rad*" ODIN_TIME_UNIT
"^2/" ODIN_SPAT_UNIT, ODIN_TIME_UNIT
"/" ODIN_SPAT_UNIT
"^2",
"rad/" ODIN_SPAT_UNIT, ODIN_TIME_UNIT
"/" ODIN_SPAT_UNIT
"^2", ODIN_GRAD_UNIT};
40 AVOID_CC_WARNING(timecourseLabel)
41 AVOID_CC_WARNING(timecoursePrefix)
42 AVOID_CC_WARNING(timecourseUnit)
52 Curve4Qwt() : size(0), x(0), y(0), spikes(
false), has_freq_phase(
false), gradmatrix(0) {}
56 double get_bounds(
bool endpoint)
const {
if(!size)
return 0.0;
if(endpoint)
return x[size-1];
else return x[0];}
81 bool operator == (
const Marker4Qwt&)
const {
return false;}
82 bool operator < (
const Marker4Qwt&)
const {
return false;}
83 double get_bounds(
bool)
const {
return x;}
97 double get_bounds(
bool)
const {
return x;}
99 double y[numof_plotchan];
109 SeqTimecourseData() : size(0), x(0), n_rec_points(0) {
for(
int i=0; i<numof_plotchan; i++) y[i]=0;}
113 double* y[numof_plotchan];
114 unsigned int n_rec_points;
119 class SeqSimFeedbackAbstract {
123 virtual void plot_vector(
double timepoint,
float M[3],
float* dM) = 0;
139 virtual void reset() = 0;
141 virtual void get_curves(STD_list<Curve4Qwt>::const_iterator& result_begin, STD_list<Curve4Qwt>::const_iterator& result_end,
double starttime,
double endtime,
double max_highres_interval )
const = 0;
143 virtual void get_signal_curves(STD_list<Curve4Qwt>::const_iterator& result_begin, STD_list<Curve4Qwt>::const_iterator& result_end,
double starttime,
double endtime )
const = 0;
145 virtual void get_markers(STD_list<Marker4Qwt>::const_iterator& result_begin, STD_list<Marker4Qwt>::const_iterator& result_end,
double starttime,
double endtime )
const = 0;
147 virtual bool timecourse_created(timecourseMode type)
const = 0;
149 virtual bool create_timecourses(timecourseMode type,
const STD_string& nucleus,
ProgressMeter* progmeter)
const = 0;
153 virtual const SeqTimecourseData* get_subtimecourse(timecourseMode type,
double starttime,
double endtime)
const = 0;
155 virtual void get_timecourse_markers(timecourseMode type, STD_list<TimecourseMarker4Qwt>::const_iterator& result_begin, STD_list<TimecourseMarker4Qwt>::const_iterator& result_end,
double starttime,
double endtime )
const = 0;
157 virtual double get_total_duration()
const = 0;
159 virtual unsigned int n_frames()
const = 0;
161 virtual LDRblock& get_opts(
bool timecourse_opts,
bool simulation_opts)
const = 0;
163 virtual void set_coilsdir(
const STD_string& coilsdir)
const = 0;
165 virtual void add_signal_curve(
const Curve4Qwt& signal_curve)
const = 0;
167 virtual bool monitor_simulation()
const = 0;
169 virtual bool simulate(
const STD_string& fidfile,
const STD_string& samplefile,
ProgressMeter* progmeter, SeqSimFeedbackAbstract* feedback)
const = 0;
171 virtual bool has_curves_on_channel(plotChannel chan)
const = 0;
bool operator==(const TinyVector< T, N_rank > &t1, const TinyVector< T, N_rank > &t2)
bool operator<(const STD_complex &c1, const STD_complex &c2)
fvector phase(const cvector &cv)