fieldmap.h
1 /***************************************************************************
2  fieldmap.h - description
3  -------------------
4  begin : Mon Feb 25 2007
5  copyright : (C) 2000-2015 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 RECOFIELDMAP_H
19 #define RECOFIELDMAP_H
20 
21 #include "step.h"
22 
23 static const char* posted_fmap_str="fieldmap";
24 
25 
26 class RecoFieldMap : public RecoStep {
27 
28  // implementing virtual functions of RecoStep
29  STD_string label() const {return "fieldmap";}
30  STD_string description() const {return "Calculate fieldmap";}
31  bool process(RecoData& rd, RecoController& controller);
32  RecoCoord input_coord() const {return RecoCoord::coord_with_mode(RecoIndex::collected,te,line3d,line,readout);}
33  void modify_coord(RecoCoord& coord) const {coord.set_mode(RecoIndex::single, te);}
34  RecoStep* allocate() const {return new RecoFieldMap;}
35  void init() {}
36 };
37 
39 
40 class RecoFieldMapUser : public RecoStep {
41 
42  public:
43  bool get_fmap(Data<float,3>& fieldmap, const TinyVector<int,3>& dstshape, const RecoCoord& fmapcoord, RecoController& controller);
44 
45  static void modify4fieldmap(RecoCoord& coord);
46 
47  private:
48  // cache interpolated fieldmaps
49  typedef STD_map<RecoCoord, Data<float,3> > FieldMap;
50  FieldMap fmap;
51  Mutex fmapmutex;
52 
53 };
54 
55 
56 #endif
57 
fieldmap: Calculate fieldmap
Definition: fieldmap.h:26
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
Definition: tjthread.h:46
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