ODIN
multifreq.h
1 /***************************************************************************
2  multifreq.h - description
3  -------------------
4  begin : Wed Jun 6 2007
5  copyright : (C) 2000-2021 by Thies Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef RECOMULTIFREQ_H
19 #define RECOMULTIFREQ_H
20 
21 #include "fieldmap.h"
22 
23 
24 class RecoMultiFreq : public RecoStep {
25 
26  // implementing virtual functions of RecoStep
27  STD_string label() const {return "multifreq";}
28  STD_string description() const {return "Generate multi-frequency ADCs based on fieldmap";}
29  bool process(RecoData& rd, RecoController& controller);
30  RecoCoord input_coord() const {return RecoCoord::coord_with_mode(RecoIndex::collected,readout);}
31  void modify_coord(RecoCoord& coord) const {}
32  bool query(RecoQueryContext& context);
33  RecoStep* allocate() const {return new RecoMultiFreq;}
34  void init();
35 
36  LDRint max_numof_freq;
37 
38 
39  bool get_freqs(Data<float,1>& result, const RecoCoord& fmapcoord, double adcdur, RecoController& controller);
40 
41 
42  // cache frequency values
43  typedef STD_map<RecoCoord, Data<float,1> > FreqMap;
44  FreqMap freqmap;
45  Mutex freqmutex;
46 
47  darray echoTimeStamps; // epis x echoes
48  Mutex stampmutex;
49 };
50 
52 
53 
54 class RecoFreqComb : public RecoFieldMapUser {
55 
56  // implementing virtual functions of RecoStep
57  STD_string label() const {return "freqcomb";}
58  STD_string description() const {return "Combine multi-frequency images using fieldmap";}
59  bool process(RecoData& rd, RecoController& controller);
60  RecoCoord input_coord() const {return RecoCoord::coord_with_mode(RecoIndex::collected,freq,line3d,line,readout);}
61  void modify_coord(RecoCoord& coord) const {coord.set_mode(RecoIndex::single,freq);}
62  RecoStep* allocate() const {return new RecoFreqComb;}
63  void init() {}
64 
65 
66  bool get_freqs(Data<float,1>& result, const RecoCoord& fmapcoord, RecoController& controller);
67 
68 };
69 
70 
71 #endif
72 
Definition: tjthread.h:46
freqcomb: Combine multi-frequency images using fieldmap
Definition: multifreq.h:54
multifreq: Generate multi-frequency ADCs based on fieldmap
Definition: multifreq.h:24
static RecoCoord coord_with_mode(RecoIndex::indexMode m, recoDim d1=n_recoDims, recoDim d2=n_recoDims, recoDim d3=n_recoDims, recoDim d4=n_recoDims, recoDim d5=n_recoDims, recoDim d6=n_recoDims, recoDim d7=n_recoDims, recoDim d8=n_recoDims)
Definition: index.h:254
RecoCoord & set_mode(RecoIndex::indexMode m, recoDim d1=n_recoDims, recoDim d2=n_recoDims, recoDim d3=n_recoDims, recoDim d4=n_recoDims, recoDim d5=n_recoDims, recoDim d6=n_recoDims, recoDim d7=n_recoDims, recoDim d8=n_recoDims)
Definition: index.h:238