This file is indexed.

/usr/include/odinseq/seqacqepi.h is in libodin-dev 1.8.8-2ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
/***************************************************************************
                          seqacqepi.h  -  description
                             -------------------
    begin                : Wed Aug 8 2001
    copyright            : (C) 2000-2014 by Thies H. Jochimsen
    email                : thies@jochimsen.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef SEQACQEPI_H
#define SEQACQEPI_H

#include <odinseq/seqacq.h>
#include <odinseq/seqgrad.h>
#include <odinseq/seqlist.h>
#include <odinseq/seqloop.h>
#include <odinseq/seqdelay.h>
#include <odinseq/seqgradtrapez.h>
#include <odinseq/seqgradconst.h>
#include <odinseq/seqparallel.h>
#include <odinseq/seqdriver.h>


/**
  * @ingroup odinseq_internals
  * The base class for platform specific EPI drivers
  */
class SeqEpiDriver : public SeqDriverBase, public SeqObjList, public virtual SeqAcqInterface, public virtual SeqGradInterface {

 public:

  SeqEpiDriver() {}
  virtual ~SeqEpiDriver() {}

  virtual void init_driver(const STD_string& object_label,double sweepwidth,
            float kread_min,  float kread_max,  unsigned readntps,
            float kphase_min, float kphase_max, unsigned phasentps,int startindex_phase,
            bool ramp_sampling,rampType rampmode, float ramp_steepness,
            const STD_string& nucleus, const dvector& phaselist, const dvector& freqlist, unsigned int echo_pairs) = 0;

  virtual unsigned get_npts_read() const = 0;

  virtual unsigned int get_numof_gradechoes() const = 0;

  virtual double get_echoduration() const = 0;

  virtual double get_ramp_rastertime() const = 0;

  virtual float get_gradintegral2center_read() const = 0;

  virtual float get_gradintegral2center_phase() const = 0;

  virtual fvector get_readout_shape() const = 0;

  virtual const kSpaceCoord& get_kcoord_template(unsigned int& padded_zeroes) const = 0;

  virtual SeqEpiDriver* clone_driver() const = 0;

  unsigned int get_npts() const {return get_npts_read()*get_numof_gradechoes();}


 protected:
  SeqEpiDriver(const SeqEpiDriver& seda) : SeqObjList(seda)  {SeqEpiDriver::operator = (seda);}

  SeqEpiDriver& operator = (const SeqEpiDriver& seda) {
    SeqObjList::operator =(seda);
    return *this;
  }


};


/////////////////////////////////////////////////////////////////////////////////////

/**
  * @ingroup odinseq_internals
  * The default EPI driver
  */
class SeqEpiDriverDefault :  public SeqEpiDriver {

  // virtual functions of SeqFreqChanInterface are marhshalled to adc

 public:
  SeqEpiDriverDefault();
  ~SeqEpiDriverDefault() {}

  SeqEpiDriverDefault(const SeqEpiDriverDefault& sedi);

  void init_driver(const STD_string& object_label,double sweepwidth,
            float kread_min,  float kread_max,  unsigned readntps,
            float kphase_min, float kphase_max, unsigned phasentps,int startindex_phase,
            bool ramp_sampling, rampType rampmode, float ramp_steepness,
            const STD_string& nucleus,
            const dvector& phaselist, const dvector& freqlist, unsigned int echo_pairs);


  // overloading virtual functions from SeqDriverBase
  odinPlatform get_driverplatform() const {return standalone;}


  // implemented virtual functions from SeqEpiDriver
  unsigned int get_npts_read() const {return adc.get_npts();}
  unsigned int get_numof_gradechoes() const;
  double get_echoduration() const {return posread.get_gradduration();}
  double get_ramp_rastertime() const {return posread.get_timestep();}
  float get_gradintegral2center_read() const {return gradint2center_read;}
  float get_gradintegral2center_phase() const {return gradint2center_phase;}
  fvector get_readout_shape() const {return readshape;}
  const kSpaceCoord& get_kcoord_template(unsigned int& padded_zeroes) const {padded_zeroes=0; return adc.get_kcoord();}
  SeqEpiDriver* clone_driver() const {return new SeqEpiDriverDefault(*this);}


  // marshalling virtual functions of SeqAcqInterface to adc, except:
  double get_acquisition_center() const;
  double get_acquisition_start() const;
  SeqAcqInterface& set_template_type(templateType type);




  // implementing virtual functions of SeqGradInterface
  SeqGradInterface& set_strength(float gradstrength) {return *this;}
  SeqGradInterface& invert_strength() {kernel.invert_strength(); return *this;}
  float get_strength() const {return kernel.get_strength();}
  fvector get_gradintegral() const;
  double get_gradduration() const {return kernel.get_gradduration();}
  SeqGradInterface& set_gradrotmatrix(const RotMatrix& matrix) {kernel.set_gradrotmatrix(matrix); return *this;}


 private:
  void build_seq();

  SeqAcq adc;
  SeqDelay acqdelay_begin;
  SeqDelay acqdelay_middle;
  SeqDelay acqdelay_end;

  SeqGradTrapez posread;
  SeqGradTrapez negread;

  SeqGradTrapez phaseblip1st;
  SeqGradTrapez phaseblip2nd;
  SeqGradDelay phasezero1st;
  SeqGradDelay phasezero2nd;
  SeqGradDelay phasezero_lastblip;

  SeqGradChanParallel gradkernel;
  SeqGradChanParallel lastgradkernel;
  SeqObjList oneadckernel;
  SeqObjList adckernel;
  SeqObjList lastadckernel;
  SeqParallel kernel;
  SeqParallel lastkernel;

  SeqObjLoop loop;

  float gradint2center_read;
  float gradint2center_phase;
  int centerindex_phase;
  fvector readshape;
  templateType templtype;
  int echopairs;
  bool lastecho;
};



/////////////////////////////////////////////////////////////////////////////////////

class SeqAcqEPIdephObjs; // forward declaration

/**
  * @addtogroup odinseq
  * @{
  */

/**
  * \brief  Acquisition + echo-planar imaging readout
  *
  * This class represents an acquisition window with an EPI gradient.
  */
class SeqAcqEPI : public SeqObjBase, public virtual SeqAcqInterface, public virtual SeqGradInterface  {

 public:

/**
  * Constructs an acquisition window with an EPI gradient labeled 'object_label' with the
  * following properties:
  * - sweepwidth: The sampling frequency
  * - read_size:   The number of sampling points per gradient echo, with ramp_sampling enabled, this is the number of points after regridding
  * - FOVread:    The Field Of View in read direction
  * - phase_size: The final matrix size in phase direction without partial fourier undersampling
  * - FOVphase:   The Field Of View in phase direction
  * - shots:      Number of shots, a multi-shot (segmented) EPI readout will be created if 'shots' is larger than 1
  * - reduction:  Reduction factor (parallel imaging)
  * - os_factor:  The oversampling factor, os_factor=1 means no oversampling
  * - nucleus:    The nucleus to measure
  * - phaselist:  Phase list for acquisition
  * - freqlist:   Frequency list for acquisition
  * - rampmode:    This parameter determines the shape of the ramp waveform
  * - ramp_sampling: The EPI readout performs data acquisition during the ramps if this parameter is set to 'true'
  * - ramp_steepness: This parameter in the range of ]0,1] determines the relative rising
  *                  speed of the gradient strength, i.e. with 1 the gradients are switched
  *                  as fast as possible
  * - fourier_factor: The amount of undersampling (0=no undersampling, 1=half fourier)
  * - echo_pairs: Number of interleaved acquired pairs of echoes for one phase-encodin step, 0 means only one echo
  */
  SeqAcqEPI(const STD_string& object_label, double sweepwidth,
            unsigned int read_size, float FOVread,
            unsigned int phase_size, float FOVphase,
            unsigned int shots=1, unsigned int reduction=1, float os_factor=1.0, const STD_string& nucleus="",
            const dvector& phaselist=0, const dvector& freqlist=0,
            rampType rampmode = linear, bool ramp_sampling=false, float ramp_steepness=1.0,
            float fourier_factor=0.0, unsigned int echo_pairs=0, bool invert_partial_fourier=false);



/**
  * Constructs an acquisition window with an EPI gradient which is a copy of 'sae'
  */
  SeqAcqEPI(const SeqAcqEPI& sae);

/**
  * Constructs an empty acquisition window with an EPI gradient with the given label.
  */
  SeqAcqEPI(const STD_string& object_label="unnamedSeqAcqEPI");

/**
  * Destructor
  */
  ~SeqAcqEPI();

/**
  * Returns the number of points that will be acquired during each read gradient period,
  * including the ramp points.
  */
  unsigned int get_npts_read() const {return driver->get_npts_read();}

/**
  * Returns the number of gradient echoes, i.e. the number of k-space lines that will
  * be sampled
  */
  unsigned int get_numof_gradechoes() const {return driver->get_numof_gradechoes();}

/**
  * Returns the readout gradient shape that is used for regridding
  */
  fvector get_readout_shape() const {return driver->get_readout_shape();}

/**
  * This assignment operator will make this object become an exact copy of 'sae'.
  */
  SeqAcqEPI& operator = (const SeqAcqEPI& sae);


  // forwarding virtual functions of SeqAcqInterface to driver
  // we cannot use marshalling with a fixed pointer here because
  // driver may be changed when switching platform
  double get_acquisition_center() const {return driver->get_acquisition_center();}
  double get_acquisition_start() const {return driver->get_acquisition_start();}
  unsigned int get_npts() const {return driver->get_npts();}
  SeqAcqInterface& set_sweepwidth(double sw, float os_factor); // produce warning
  double get_sweepwidth() const {return driver->get_sweepwidth();}
  float get_oversampling() const {return os_factor_cache;}
  SeqAcqInterface& set_template_type(templateType type);
  SeqAcqInterface& set_reco_vector(recoDim dim, const SeqVector& vec, const dvector& valvec=dvector()) {driver->set_reco_vector(dim,vec,valvec); return *this;}
  SeqAcqInterface& set_default_reco_index(recoDim dim, unsigned int index) {driver->set_default_reco_index(dim,index); return *this;}

  // forwarding virtual functions of SeqFreqChanInterface to driver
  SeqFreqChanInterface& set_nucleus(const STD_string& nucleus) {driver->set_nucleus(nucleus); return *this;}
  SeqFreqChanInterface& set_freqlist(const dvector& freqlist) {driver->set_freqlist(freqlist); return *this;}
  SeqFreqChanInterface& set_phaselist(const dvector& phaselist) {driver->set_phaselist(phaselist); return *this;}
  const SeqVector& get_freqlist_vector() const {return driver->get_freqlist_vector();}
  const SeqVector& get_phaselist_vector() const {return driver->get_phaselist_vector();}

  // forwarding virtual functions of SeqGradInterface to driver
  SeqGradInterface& set_strength(float gradstrength) {driver->set_strength(gradstrength); return *this;}
  SeqGradInterface& invert_strength() {driver->invert_strength(); return *this;}
  float get_strength() const {return driver->get_strength();}
  fvector get_gradintegral() const {return driver->get_gradintegral();}
  double get_gradduration() const {return driver->get_gradduration();}
  SeqGradInterface& set_gradrotmatrix(const RotMatrix& matrix) {driver->set_gradrotmatrix(matrix); return *this;}


  // forwarding virtual functions of SeqTreeObj to driver
  STD_string get_program(programContext& context) const {return driver->get_program(context);}
  double get_duration() const {return driver->get_duration();}
  SeqValList get_freqvallist(freqlistAction action) const {return driver->get_freqvallist(action);}
  void query(queryContext& context) const {driver->query(context);}
  RecoValList get_recovallist(unsigned int reptimes, JDXkSpaceCoords& coords) const;
  bool contains(const SeqTreeObj* sto) const {return driver->contains(sto);}
  void tree(SeqTreeCallbackAbstract* display) const {driver->tree(display);}
  unsigned int event(eventContext& context) const {return driver->event(context);}
  STD_string get_properties() const {return driver->get_properties();}


 private:

  SeqVector& get_mutable_freqlist_vector() {return driver->get_mutable_freqlist_vector();}
  SeqVector& get_mutable_phaselist_vector() {return driver->get_mutable_phaselist_vector();}

  // overloaded for SeqAcqDeph
  const SeqVector* get_dephgrad(SeqGradChanParallel& dephobj, bool rephase) const;

  // overwriting virtual functions from SeqClass
  bool prep();

  void common_init();

  void create_deph_and_reph();


  unsigned int readsize_os_cache;
  float os_factor_cache;
  unsigned int phasesize_cache;
  unsigned int segments_cache;
  unsigned int reduction_cache;
  int echo_pairs_cache;
  float blipint_cache;
  templateType templtype_cache;
  rampType ramptype_cache;

  mutable SeqDriverInterface<SeqEpiDriver> driver;

  SeqAcqEPIdephObjs* dephobjs;
};


/** @}
  */

#endif