This file is indexed.

/usr/include/odinseq/seqpulsar.h is in libodin-dev 1.8.5-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
/***************************************************************************
                          seqpulsar.h  -  description
                             -------------------
    begin                : Wed Aug 8 2001
    copyright            : (C) 2001 by Thies H. Jochimsen
    email                : jochimse@cns.mpg.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 SEQPULSAR_H
#define SEQPULSAR_H

#include <tjutils/tjhandler.h>

#include <odinseq/seqpulsndim.h>
#include <odinseq/odinpulse.h>
#include <odinseq/seqgradtrapez.h>



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

/**
  * \brief  Pulsar pulses, combines OdinPulse and SeqPulsNdim
  *
  * This class is an interface to the Pulsar program;
  * It is possible to access most of the parameters of the underlying
  * data structure 'OdinPulse' via get/set functions
  */
class SeqPulsar : public SeqPulsNdim, public OdinPulse, public StaticHandler<SeqPulsar> {

 public:

/**
  * Constructs an empty Pulsar pulse with the given label.
  * If 'rephased' is true, rephasing gradient lobes will be added to null the
  * zero'th order gradient moment, i.e. the integral.
  * If 'interactive' is true, the pulse will be updated each time a parameter
  * was changed, otherwise update() has to be called manually.
  */
  SeqPulsar(const STD_string& object_label = "unnamedSeqPulsar", bool rephased=false, bool interactive=true);

/**
  * Constructs a Pulsar pulse which is a copy of 'sp'
  */
  SeqPulsar(const SeqPulsar& sp);

/**
  * Destructor
  */
  ~SeqPulsar();

/**
  * Specifies whether an additional gradient rephasing lobe will be added to rephase
  * the magnetization in case of an excitation pulse.
  * If strength is larger than zero, this maximum strength will be used
  * for the rephaser gradient.
  */
  SeqPulsar& set_rephased(bool rephased, float strength=0.0);

/**
  * Returns the rephasers integral on all three channels
  */
  fvector get_reph_gradintegral() const;

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

/**
  * Recalculates the pulse manually, this is only required if the pulse is not interactive
  */
  SeqPulsar& refresh();

/**
  * If this flag is set to true, the pulse will be recalculated each time a parameter is changed,
  * otherwise it must be done manually via the refresh() function
  */
  SeqPulsar& set_interactive(bool flag);


  // overloading virtual function from SeqGradInterface
  float get_strength() const {return OdinPulse::get_G0();} // always return strength of pulse, and not that of rephasers


  // reimplemented virtual functions from SeqPulsNdim
  int get_dims() const;

  // reimplemented virtual functions from SeqFreqChanInterface
  SeqFreqChanInterface& set_nucleus(const STD_string& nucleus);

  // reimplemented virtual functions from SeqPulsInterface
  float get_flipangle() const {return OdinPulse::get_flipangle(); }
  SeqPulsInterface& set_flipangle(float flipangle);
  SeqPulsInterface& set_pulsduration(float pulsduration);
  SeqPulsInterface& set_power(float pulspower);
  SeqPulsInterface& set_pulse_type(pulseType type);
  pulseType get_pulse_type() const { return SeqPulsNdim::get_pulse_type();}


  // overloading virtual function from SeqTreeObj
  STD_string get_properties() const;


  // initialize/destroy static members via StaticHandler
  static void init_static();
  static void destroy_static();

  // Dummy operators for vector of pulsars with STL replacement
  bool operator == (const SeqPulsar& sp) const {return STD_string(get_label())==STD_string(sp.get_label());}
  bool operator <  (const SeqPulsar& sp) const {return STD_string(get_label())<STD_string(sp.get_label());}
  bool operator != (const SeqPulsar& sp) const {return !(*this==sp);}


 private:

  friend class SeqPulsarReph;
  friend class SeqMethod;
  friend class SeqMethodProxy;

  // virtual functions of OdinPulse
  OdinPulse& update();
  void update_B10andPower();

  bool rephased_pulse;
  float rephaser_strength;
  bool attenuation_set;
  bool always_refresh;

  SeqGradTrapez* reph_grad[n_directions];

  static void register_pulse(SeqPulsar* pls);
  static void unregister_pulse(SeqPulsar* pls);

  // struct to store references to all pulses which are currently active
  struct PulsarList : public STD_list<const SeqPulsar*>, public Labeled {};

  static SingletonHandler<PulsarList,false> active_pulsar_pulses;

};


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

/**
  *
  * \brief Post-pulse rephaser
  *
  * This class represents a rephasing gradient pulse for SeqPulsar, i.e. it can serve as a refocusing lobe for a SeqPulsar
  * pulse
  */
class SeqPulsarReph : public SeqGradChanParallel {

 public:
/**
  * Constructs a rephasing gradient pulse labeled 'object_label' with the following properties:
  * - puls:   The puls that should be rephased
  */
  SeqPulsarReph(const STD_string& object_label,const SeqPulsar& puls);

/**
  * Constructs a copy of 'spr'
  */
  SeqPulsarReph(const SeqPulsarReph& spr);

/**
  * Construct an empty rephasing gradient pulse with the given label
  */
  SeqPulsarReph(const STD_string& object_label = "unnamedSeqPulsarReph");

/**
  * Destructor
  */
  ~SeqPulsarReph();

/**
  * Assignment operator that makes this object become a copy of 'spr'
  */
  SeqPulsarReph& operator = (const SeqPulsarReph& spr);


/**
  * Returns the duration of the ramp that switches the gradient pulse on
  */
  float get_onramp_duration() const;

/**
  * Returns the duration of the rephasing part of the gradient pulse
  */
  float get_constgrad_duration() const;

/**
  * Returns the duration of the ramp that switches the gradient pulse on
  */
  float get_offramp_duration() const;


 private:
  void build_seq();

  unsigned int dim;

  SeqGradTrapez gxpulse;
  SeqGradTrapez gypulse;
  SeqGradTrapez gzpulse;

};



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

/**
  *
  * \brief Sinc pulse
  *
  * A sinc shaped pulse
  *
  */
class SeqPulsarSinc : public SeqPulsar {

 public:
/**
  * Constructs a slice selective sinc pulse labeled 'object_label' with the following properties:
  * - slicethickness: The thickness of the slice that will be excited
  * - rephased:      If true, an additional gradient lobe will be added to rephase the magnetisation
  * - duration:       The pulse duration
  * - flipangle:      The flip angle
  * - resolution:     The spatial resolution, i.e. the scale on which the excitation profile is smoothed
  * - npoints:        The number of digitised (complex) points for the pulse
  */
  SeqPulsarSinc(const STD_string& object_label="unnamedSeqPulsarSinc", float slicethickness=5.0, bool rephased=true, float duration=2.0, float flipangle=90.0, float resolution=1.5, unsigned int npoints=256);

/**
  * Constructs a copy of 'sps'
  */
  SeqPulsarSinc(const SeqPulsarSinc& sps);

/**
  * Assignment operator that makes this object become a copy of 'sps'
  */
  SeqPulsarSinc& operator = (const SeqPulsarSinc& sps);

};


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

/**
  *
  * \brief Gauss pulse
  *
  * A Gaussian shaped pulse
  *
  */
class SeqPulsarGauss : public SeqPulsar {

 public:
/**
  * Constructs a slice selective Gauss pulse labeled 'object_label' with the following properties:
  * - slicethickness: The thickness of the slice (FWHM) that will be excited
  * - rephased:      If true, an additional gradient lobe will be added to rephase the magnetisation
  * - duration:       The pulse duration
  * - flipangle:      The flip angle
  * - npoints:        The number of digitised (complex) points for the pulse
  */
  SeqPulsarGauss(const STD_string& object_label="unnamedSeqPulsarGauss", float slicethickness=5.0, bool rephased=true, float duration=1.0, float flipangle=90.0, unsigned int npoints=128);

/**
  * Constructs a copy of 'spg'
  */
  SeqPulsarGauss(const SeqPulsarGauss& spg);

/**
  * Assignment operator that makes this object become a copy of 'spg'
  */
  SeqPulsarGauss& operator = (const SeqPulsarGauss& spg);

};


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

/**
  *
  * \brief Const pulse
  *
  * A block shaped shaped pulse
  *
  */
class SeqPulsarBP : public SeqPulsar {

 public:
/**
  * Constructs a block shaped pulse labeled 'object_label' with the following properties:
  * - duration:       The pulse duration
  * - flipangle:      The flip angle
  */
  SeqPulsarBP(const STD_string& object_label="unnamedSeqPulsarBP", float duration=1.0, float flipangle=90.0, const STD_string& nucleus="");

/**
  * Constructs a copy of 'spb'
  */
  SeqPulsarBP(const SeqPulsarBP& spb);

/**
  * Assignment operator that makes this object become a copy of 'spb'
  */
  SeqPulsarBP& operator = (const SeqPulsarBP& spb);

};




/** @}
  */

#endif