msl 1.3.0
Loading...
Searching...
No Matches
Linear.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 _202fc48b_829a_440a_a766_6efbf58f69d1
5#define _202fc48b_829a_440a_a766_6efbf58f69d1
6
7#include "msl/GradientPulse.h"
8#include "msl/Readout.h"
9#include "msl/Vector.h"
10
11namespace msl
12{
13
15namespace readouts
16{
17
19class Linear: public Readout
20{
21public:
24
25 Linear(Linear const &) = default;
26 Linear(Linear &&) = default;
27 Linear & operator=(Linear const &) = default;
28 Linear & operator=(Linear &&) = default;
29 ~Linear() override = default;
30
32 Vector3d const & start() const;
33
36
38 Vector3d const & end() const;
39
42
44 std::size_t size() const;
45
47 Linear & setSize(std::size_t size);
48
50 void update();
51
52 NLSStatus prepare(
53 MrProt & protocol, SeqLim & limits, SeqExpo & exports) override;
54 NLSStatus run(
55 MrProt & protocol, SeqLim & limits, SeqExpo & exports) override;
56
57protected:
60
63
65 std::size_t _size;
66
72};
73
74}
75}
76
77#endif // _202fc48b_829a_440a_a766_6efbf58f69d1
Trapezoidal or arbitrary gradient pulse on three axes.
Definition GradientPulse.h:21
Vector3d const & start() const
Return the starting k-space point.
Linear & setStart(Vector3d const &start)
Set the starting k-space point.
Vector3d const & end() const
Return the end k-space point.
msl::GradientPulse _computeGradient() const
Return the gradient lobe corresponding to the current start and end.
Vector3d _end
End k-space point.
Definition Linear.h:62
Linear & setEnd(Vector3d const &end)
Set the end k-space point.
void update()
Update the gradient following a modification of start and/or end.
std::size_t _size
Number of discrete k-space points.
Definition Linear.h:65
Linear & setSize(std::size_t size)
Set the number of discrete k-space points.
NLSStatus prepare(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Prepare the real-time events.
Linear()
Create a null readout.
Vector3d _start
Starting k-space point.
Definition Linear.h:59
std::size_t size() const
Return the number of discrete k-space points.
NLSStatus run(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Run the real-time events.
Namespace for all Readout-derived objects.
Definition Linear.h:16
Top-level namespace of the msl library.
Definition acceleration.h:17
Vector< 3, double > Vector3d
3D vector of doubles
Definition Vector.h:136