phasecorr.h
1 /***************************************************************************
2  phasecorr.h - description
3  -------------------
4  begin : Mon Jan 24 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 RECOPHASECORR_H
19 #define RECOPHASECORR_H
20 
21 #include "step.h"
22 
23 class RecoPhaseMap : public RecoStep {
24 
25  public:
26 
27  static void modify(RecoCoord& coord) { // to be used in query()
28  coord.set_mode(RecoIndex::ignore, line, line3d); // dimensions irrelevant to phase correction
29  coord.set_mode(RecoIndex::separate, echo); // override collected mode
30  }
31 
32  static void modify4blackboard(RecoCoord& coord) { // index for blackboard
33  modify(coord);
34  coord.set_mode(RecoIndex::separate, epi); // no longer ignore EPI index
35  coord.set_mode(RecoIndex::ignore, repetition, dti, line3d, templtype, freq); // re-use phasemap for all repetitions, etc.
36  }
37 
38 
39  private:
40  // implementing virtual functions of RecoStep
41  STD_string label() const {return "phasemap";}
42  STD_string description() const {return "Calculate and post phasemap for echo-by-echo phase correction";}
43  bool process(RecoData& rd, RecoController& controller);
44  RecoCoord input_coord() const {return RecoCoord::coord_with_mode(RecoIndex::collected,echo,readout);}
45  void modify_coord(RecoCoord& coord) const {}
46  bool query(RecoQueryContext& context);
47  RecoStep* allocate() const {return new RecoPhaseMap;}
48  void init() {}
49 
50  bool odd_even_echoes;
51 };
52 
53 
55 
56 
57 class RecoPhaseCorr : public RecoStep {
58 
59 
60  // implementing virtual functions of RecoStep
61  STD_string label() const {return "phasecorr";}
62  STD_string description() const {return "Apply echo-by-echo phase correction";}
63  bool process(RecoData& rd, RecoController& controller);
64  RecoCoord input_coord() const {return RecoCoord::coord_with_mode(RecoIndex::collected,readout);}
65  void modify_coord(RecoCoord& coord) const {}
66  RecoStep* allocate() const {return new RecoPhaseCorr;}
67  void init() {}
68 
69 };
70 
71 
72 
73 #endif
74 
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
phasemap: Calculate and post phasemap for echo-by-echo phase correction
Definition: phasecorr.h:23
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
phasecorr: Apply echo-by-echo phase correction
Definition: phasecorr.h:57