msl 1.3.0
Loading...
Searching...
No Matches
msl::GradientPulse Class Reference

Detailed Description

Trapezoidal or arbitrary gradient pulse on three axes.

Note
Trapezoidal gradients have matching ramp and plateau durations on all axes and equal ramp up and ramp down durations.

#include <GradientPulse.h>

Public Types

enum class  Kind { Trapezoidal , Arbitrary }
 Kind of the gradient object.

Public Member Functions

 GradientPulse ()
 Create a 0-area trapezoidal gradient on all axes.
 GradientPulse (Vector3d const &amplitude, long rampDuration, long plateauDuration)
 Create a trapezoidal gradient pulse.
 GradientPulse (std::vector< Vector3d > const &amplitude)
 Create an arbitrary gradient pulse.
 GradientPulse (GradientPulse const &)=default
 GradientPulse (GradientPulse &&)=default
GradientPulseoperator= (GradientPulse const &)=default
GradientPulseoperator= (GradientPulse &&)=default
GradientPulseupdate (GradientPulse const &pulse)
 Update the gradients amplitudes and durations without changing the start time.
Vector3d amplitude () const
 Return the plateau gradient amplitude (for trapezoidal gradients) or the maximum positive amplitude (for shaped gradients) in mT/m.
long rampDuration () const
 Return the ramp duration in µs (trapezoidal gradients only).
long plateauDuration () const
 Return the plateau duration in µs (trapezoidal gradients only).
long duration () const
 Return the total duration in µs.
Vector3d area () const
 Return the total area in mT/m*µs.
Vector3d area (double begin, double end) const
 Return a partial area in mT/m*µs.
Vector3d areaFrom (double begin) const
 Return the area in mT/m*µs from begin to the end of the gradient pulse.
Vector3d areaTo (double end) const
 Return the area in mT/m*µs from 0 to the requested end.
Vector3d rampArea () const
 Return the ramp area in mT/m*µs (trapezoidal gradients only).
Vector3d plateauArea () const
 Return the plateau area in mT/m*µs (trapezoidal gradients only).
long startTime () const
 Return the start time in µs.
GradientPulsesetStartTime (long startTime)
 Set the start time in µs.
long plateauTime () const
 Return the start time of the plateau in µs (trapezoidal gradients only).
GradientPulsesetPlateauTime (long plateauTime)
 Set the start time of the plateau in µs (trapezoidal gradients only).
long endTime () const
 Return the end time in µs.
GradientPulsesetEndTime (long endTime)
 Set the end time in µs.
IGRAD_PULSE_BASE * operator[] (std::size_t i) const
 Return a pointer to the internal gradient object.
Kind const & kind () const
 Return the kind of the gradient object.
NLSStatus run ()
 Run the non-0 gradients on the three axes.

Constructor & Destructor Documentation

◆ GradientPulse() [1/2]

msl::GradientPulse::GradientPulse ( Vector3d const & amplitude,
long rampDuration,
long plateauDuration )

Create a trapezoidal gradient pulse.

Parameters
amplitudePlateau amplitude on each axis(mT/m)
rampDurationDuration of up- and down-ramps (µs)
plateauDurationDuration of plateau (µs)
Attention
Neither maximum amplitude nor maximum slew rate are checked

◆ GradientPulse() [2/2]

msl::GradientPulse::GradientPulse ( std::vector< Vector3d > const & amplitude)

Create an arbitrary gradient pulse.

Parameters
amplitudeAmplitude at each GRAD_RASTER_TIME, on each axis(mT/m)
Attention
Neither maximum amplitude nor maximum slew rate are checked

Member Function Documentation

◆ area()

Vector3d msl::GradientPulse::area ( double begin,
double end ) const

Return a partial area in mT/m*µs.

If begin (resp. end) is negative, it is transformed to duration()-begin (resp. duration()-end).

◆ areaFrom()

Vector3d msl::GradientPulse::areaFrom ( double begin) const

Return the area in mT/m*µs from begin to the end of the gradient pulse.

The transform described in area(begin, end) applies.

◆ areaTo()

Vector3d msl::GradientPulse::areaTo ( double end) const

Return the area in mT/m*µs from 0 to the requested end.

The transform described in area(begin, end) applies.

◆ run()

NLSStatus msl::GradientPulse::run ( )

Run the non-0 gradients on the three axes.

Note
The 0-gradients are skipped so that sequence unit tests pass

The documentation for this class was generated from the following file: