msl 1.3.0
Loading...
Searching...
No Matches
CartesianReadout.h
Go to the documentation of this file.
1// Copyright 2025-2026 Julien Lamy, ICube, Université de Strasbourg-CNRS.
2// Part of msl, distributed under the terms of the MIT license.
3
4#ifndef _5ab5cca8_2d48_40c2_89b5_30f7c75ca92d
5#define _5ab5cca8_2d48_40c2_89b5_30f7c75ca92d
6
7#include <MrMeasSrv/SeqIF/libRT/sREADOUT.h>
8
9#include <msl/KSpace.h>
10#include <msl/GradientPulse.h>
11#include <msl/helpers.h>
12#include <msl/NCOPair.h>
13#include <msl/RealTimeEvents.h>
14#include <msl/Vector.h>
15
16namespace msl
17{
18
24class MSL_DEPRECATED CartesianReadout: public RealTimeEvents
25{
26public:
27 CartesianReadout();
28 virtual ~CartesianReadout() override = default;
29 CartesianReadout(CartesianReadout const &) = default;
30 CartesianReadout(CartesianReadout &&) = default;
31 CartesianReadout & operator=(CartesianReadout const &) = default;
32 CartesianReadout & operator=(CartesianReadout &&) = default;
33
35 double phase() const;
36
38 CartesianReadout & setPhase(double phase);
39
42
44 CartesianReadout & setIndex(msl::Vector2l const & index);
45
50 double adcStartPosition() const;
51
56 CartesianReadout & setADCStartPosition(double k);
57
62 CartesianReadout & setADCStartPosition(double x, msl::KSpace const & kspace);
63
68 double adcEndPosition() const;
69
74 CartesianReadout & setADCEndPosition(double k);
75
81 CartesianReadout & setADCEndPosition(double x, msl::KSpace const & kspace);
82
87 CartesianReadout & setADCPosition(double kStart, double kEnd);
88
93 CartesianReadout & setADCPosition(
94 double xStart, double xEnd, msl::KSpace const & kSpace);
95
97 long contrast() const;
98
100 CartesianReadout & setContrast(long contrast);
101
106 long timeOffset() const;
107
112 CartesianReadout & setTimeOffset(long timeOffset);
113
118 bool reverted() const;
119
124 CartesianReadout & setReverted(bool reverted);
125
127 long echoTime() const;
128
131
134
135 NLSStatus prepare(
136 MrProt & protocol, SeqLim & limits, SeqExpo & exports) override;
137 NLSStatus run(
138 MrProt & protocol, SeqLim & limits, SeqExpo & exports) override;
139
140 MrProtocolData::SeqExpoRFInfo rfInfo() const override;
141
142 long startTime() const override;
143 long endTime() const override;
144
147
149 long adcStartTime() const;
150
152 long adcEndTime() const;
153
159
165
171
177
182 sREADOUT const & adc() const;
183
188 sREADOUT & adc();
189
190private:
191 double _phase;
192 msl::Vector2l _index;
193 double _adcStartPosition, _adcEndPosition;
194 long _contrast;
195 long _timeOffset;
196 bool _reverted;
197
198 long _echoTime;
199
200 msl::GradientPulse _gradient;
201 sREADOUT _adc;
202 msl::NCOPair _nco;
203};
204
205}
206
207#endif // _5ab5cca8_2d48_40c2_89b5_30f7c75ca92d
CartesianReadout & setContrast(long contrast)
Set the contrast number.
CartesianReadout & setIndex(msl::Vector2l const &index)
Set the index of the current point in the discrete ky-kz space.
long endTime() const override
Return the end time of the events.
CartesianReadout & setPhase(double phase)
Set the phase of the NCO during the readout.
msl::Vector3d areaAfterEcho() const
Return the area of the read-out gradient after the effective echo time.
CartesianReadout & setADCEndPosition(double x, msl::KSpace const &kspace)
Set the position on the x-axis the k-space at the end of the ADC (i.e. at the end of the last column)...
msl::Vector3d endPosition() const
Return the position in the k-space at the end of the gradient lobe.
CartesianReadout & setADCEndPosition(double k)
Set the position on the x-axis of the k-space at the end of the ADC (i.e. at the end of the last colu...
msl::Vector3d areaBeforeADC() const
Return the area of the read-out gradient before the start of the ADC.
long timeOffset() const
Return the time offset to get the effective echo time, accounting e.g. for the time of the excitation...
double adcStartPosition() const
Return the position on the x-axis the k-space at the start of the ADC.
msl::Vector3d areaBeforeEcho() const
Return the area of the read-out gradient before the effective echo time.
msl::Vector3d areaAfterADC() const
Return the area of the read-out gradient after the end of the ADC.
long adcStartTime() const
Return the start time of the ADC.
MrProtocolData::SeqExpoRFInfo rfInfo() const override
Return the RF information for SAR computation.
double phase() const
Return the phase of the NCO during the readout.
bool reverted() const
Return whether the readout is reverted with respect to its nominal direction. This is handled in run,...
CartesianReadout & setADCStartPosition(double x, msl::KSpace const &kspace)
Set the position on the x-axis the k-space at the start of the ADC, as a fraction of the k-space exte...
CartesianReadout & setADCPosition(double xStart, double xEnd, msl::KSpace const &kSpace)
Return the position on the x-axis the k-space at the start and the end of the ADC,...
CartesianReadout & setReverted(bool reverted)
Set whether the readout is reverted with respect to its nominal direction. This is handled in run,...
long startTime() const override
Return the start time of the events.
NLSStatus run(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Run the real-time events.
sREADOUT & adc()
Return a reference to the ADC real-time object, e.g. for updating its meta-data.
CartesianReadout & setTimeOffset(long timeOffset)
Set the time offset to get the effective echo time, accounting e.g. for the time of the excitation pu...
msl::Vector3d startPosition() const
Return the position in the k-space at the start of the gradient lobe.
long adcEndTime() const
Return the start time of the ADC.
msl::Vector2l index() const
Return the index of the current point in the discrete ky-kz space.
double adcEndPosition() const
Return the position on the x-axis the k-space at the end of the ADC.
msl::GradientPulse const & gradient() const
Return the read-out gradient.
CartesianReadout & setADCPosition(double kStart, double kEnd)
Set the position on the x-axis of the k-space at the start and the end of the ADC.
sREADOUT const & adc() const
Return a reference to the ADC real-time object, e.g. for updating its meta-data.
NLSStatus prepare(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Prepare the real-time events.
CartesianReadout & setADCStartPosition(double k)
Set the position on the x-axis of the k-space at the start of the ADC.
long contrast() const
Return the contrast number.
long echoTime() const
Return the effective echo time (requires preparation).
Trapezoidal or arbitrary gradient pulse on three axes.
Definition GradientPulse.h:21
Description of the discretized k-space geometry.
Definition KSpace.h:22
Encapsulation of a pair of NCO objects, setting and resetting the frequency and the phase of the NCO ...
Definition NCOPair.h:26
RealTimeEvents()
No-op constructor.
#define MSL_DEPRECATED
Mark as deprecated.
Definition helpers.h:79
Top-level namespace of the msl library.
Definition acceleration.h:17
Vector< 2, long > Vector2l
2D vector of longs
Definition Vector.h:130
Vector< 3, double > Vector3d
3D vector of doubles
Definition Vector.h:136