msl 1.3.0
Loading...
Searching...
No Matches
GradientPulse.h
Go to the documentation of this file.
1// Copyright 2025 Julien Lamy, ICube, Université de Strasbourg-CNRS.
2// Part of msl, distributed under the terms of the MIT license.
3
4#ifndef _a2706a74_88a7_497b_91e7_d5df6c57161f
5#define _a2706a74_88a7_497b_91e7_d5df6c57161f
6
7#include <array>
8#include <MrMeasSrv/SeqIF/libRT/sGRAD_PULSE.h>
9#include "Vector.h"
10
11namespace msl
12{
13
19{
20public:
23
30
31 GradientPulse(GradientPulse const &) = default;
35 ~GradientPulse() = default;
36
42
45
47 long rampDuration() const;
48
50 long plateauDuration() const;
51
53 long duration() const;
54
56 Vector3d area() const;
57
64 Vector3d area(double begin, double end) const;
65
72 Vector3d areaFrom(double begin) const;
73
79 Vector3d areaTo(double end) const;
80
83
86
88 long startTime() const;
89
92
94 long plateauTime() const;
95
98
100 long endTime() const;
101
104
106 sGRAD_PULSE_TRAP const & operator[](std::size_t i) const;
107
112 NLSStatus run();
113private:
114 std::array<sGRAD_PULSE_TRAP, 3> _gradients;
115};
116
117}
118
119#endif // _a2706a74_88a7_497b_91e7_d5df6c57161f
Trapezoidal gradient pulse on three axes, with matching ramp and plateau durations on all axes and eq...
Definition GradientPulse.h:19
~GradientPulse()=default
Vector3d area(double begin, double end) const
Return a partial area in mT/m*µs.
sGRAD_PULSE_TRAP const & operator[](std::size_t i) const
Return the internal gradient object.
long plateauDuration() const
Return the plateau duration in µs.
NLSStatus run()
Run the non-0 gradients on the three axes.
GradientPulse & operator=(GradientPulse const &)=default
Vector3d amplitude() const
Return the gradient amplitude in mT/m.
Vector3d rampArea() const
Return the ramp area in mT/m*µs.
Vector3d plateauArea() const
Return the plateau area in mT/m*µs.
long duration() const
Return the total duration in µs.
GradientPulse & setEndTime(long endTime)
Set the end time in µs.
Vector3d area() const
Return the total area in mT/m*µs.
long startTime() const
Return the start time in µs.
long plateauTime() const
Return the start time of the plateau in µs.
Vector3d areaTo(double end) const
Return the area in mT/m*µs from 0 to the requested end.
GradientPulse & setPlateauTime(long plateauTime)
Set the start time of the plateau in µs.
GradientPulse(GradientPulse &&)=default
Vector3d areaFrom(double begin) const
Return the area in mT/m*µs from begin to the end of the gradient pulse.
GradientPulse(GradientPulse const &)=default
GradientPulse & update(GradientPulse const &pulse)
Update the gradients amplitudes and durations without changing the start time.
long rampDuration() const
Return the ramp duration in µs.
long endTime() const
Return the end time in µs.
GradientPulse(Vector3d const &amplitude, long rampDuration, long plateauDuration)
Create a gradient pulse.
GradientPulse & setStartTime(long startTime)
Set the start time in µs.
GradientPulse & operator=(GradientPulse &&)=default
GradientPulse()
Create a 0-area gradient on all axes.
Top-level namespace of the msl library.
Definition acceleration.h:17