msl 1.3.0
Loading...
Searching...
No Matches
StackOfStars.h
Go to the documentation of this file.
1// Copyright 2026 Julien Lamy, ICube, Université de Strasbourg-CNRS.
2// Part of msl, distributed under the terms of the MIT license.
3
4#ifndef _b32783a9_89e5_4cf9_8562_045921f4107c
5#define _b32783a9_89e5_4cf9_8562_045921f4107c
6
7#include "msl/iPATMask.h"
8#include "msl/Sampling.h"
9#include "msl/helpers.h"
10#include "msl/readouts/Linear.h"
11
12namespace msl
13{
14namespace samplings
15{
16
18class StackOfStars: public Sampling
19{
20public:
22 enum Mode
23 {
24 Regular,
25 GoldenAngle
26 };
27
28 DECLARE_POINTERS(StackOfStars)
29
30 StackOfStars();
31 StackOfStars(StackOfStars const &) = default;
32 StackOfStars(StackOfStars &&) = default;
33 StackOfStars & operator=(StackOfStars const &) = default;
34 StackOfStars & operator=(StackOfStars &&) = default;
35 ~StackOfStars() override = default;
36
38 Mode const & mode() const;
39
41 StackOfStars & setMode(Mode mode);
42
43 // NOTE: 0 undefined or 1 not tiny
45 unsigned int const & tinyGoldenAngle() const;
46
51 StackOfStars & setTinyGoldenAngle(unsigned int tiny);
52
54 double phase() const override;
55
57 StackOfStars & setPhase(double phase) override;
58
60 long contrast() const override;
61
63 StackOfStars & setContrast(long contrast) override;
64
69 long timeOffset() const override;
70
75 StackOfStars & setTimeOffset(long timeOffset) override;
76
78 GradientSpecs const & gradientSpecs() const override;
79
81 StackOfStars & setGradientSpecs(GradientSpecs const & gradientSpecs) override;
82
87 uint16_t spokes() const;
88
90 StackOfStars & setSpokes(uint16_t spokes);
91
96 double relativeStart() const;
97
102 StackOfStars & setRelativeStart(double relativeStart);
103
105 iPATMask const & mask() const;
106
108 StackOfStars & setMask(iPATMask const & mask);
109
112
113 NLSStatus prepare(
114 MrProt & protocol, SeqLim & limits, SeqExpo & exports) override;
115
116 NLSStatus run(
117 MrProt & protocol, SeqLim & limits, SeqExpo & exports) override;
118
119 long startTime() const override;
120
122 long endTime() const override;
123
125 MrProtocolData::SeqExpoRFInfo rfInfo() const override;
126
127 NLSStatus updateReadout(MrProt & protocol, SeqLim & limits, SeqExpo & exports) override;
128
129 readouts::Linear const & readout() const override;
130
131private:
132 Mode _mode;
133 unsigned int _tinyGoldenAngle;
134
135 // No need to precompute the trajectories, store one and update it each time
136 // std::vector<readouts::Linear> _readouts;
137 readouts::Linear _readout;
138
139 uint16_t _spokes;
140 double _relativeStart;
141
142 iPATMask _mask;
143 iPATMask::Points _enabledPoints;
144};
145
146}
147}
148
149#endif // _b32783a9_89e5_4cf9_8562_045921f4107c
std::vector< Point > Points
Definition MaskBase.h:25
A two dimensional indicator of iPAT status.
Definition iPATMask.h:30
Linear readout defined by its start and end points.
Definition Linear.h:20
long endTime() const override
Return the end time of the events.
StackOfStars & setMode(Mode mode)
Set how the angle is incremented between two spokes.
Mode const & mode() const
Return how the angle is incremented between two spokes.
StackOfStars & setGradientSpecs(GradientSpecs const &gradientSpecs) override
Set the gradient specifications constraining the read-out duration.
StackOfStars & setPhase(double phase) override
Set the phase of the NCO during the readout.
iPATMask::Points enabledPoints() const
Return the enabled points of the mask.
readouts::Linear const & readout() const override
Return a reference to the concrete readout.
StackOfStars & setMask(iPATMask const &mask)
Set the iPAT mask.
MrProtocolData::SeqExpoRFInfo rfInfo() const override
Return the RF information for SAR computation.
long startTime() const override
Return the start time of the events.
NLSStatus updateReadout(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Update the readout with respect to index so that a subsequent call to readout() returns a readout mat...
double phase() const override
Return the phase of the NCO during the readout.
unsigned int const & tinyGoldenAngle() const
Return which golden angle is used in GoldenAngle mode.
Mode
Angle increment between two spokes.
Definition StackOfStars.h:23
StackOfStars & setTinyGoldenAngle(unsigned int tiny)
Set which golden angle is used in GoldenAngle mode (1 for "regular") golden angle.
NLSStatus run(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Run the real-time events.
StackOfStars & setTimeOffset(long timeOffset) override
Set the time offset to get the effective echo time, accounting e.g. for the time of the excitation pu...
uint16_t spokes() const
Return the number of spokes per partition.
NLSStatus prepare(MrProt &protocol, SeqLim &limits, SeqExpo &exports) override
Prepare the real-time events.
long contrast() const override
Return the contrast number.
GradientSpecs const & gradientSpecs() const override
Return the gradient specifications constraining the read-out duration.
StackOfStars & setContrast(long contrast) override
Set the contrast number.
double relativeStart() const
Return the starting point along the spoke in the relative k-space (i.e. normalized between -1 and +1)...
StackOfStars & setRelativeStart(double relativeStart)
Set the starting point along the spoke in the relative k-space (i.e. normalized between -1 and +1).
long timeOffset() const override
Return the time offset to get the effective echo time, accounting e.g. for the time of the excitation...
iPATMask const & mask() const
Return the iPAT mask.
StackOfStars & setSpokes(uint16_t spokes)
Set the number of spokes per partition.
#define DECLARE_POINTERS(name)
Declare pointer type aliases.
Definition helpers.h:83
Namespace for all Readout-derived objects.
Definition Cartesian.h:16
Top-level namespace of the msl library.
Definition acceleration.h:17
Specifications of the gradient system.
Definition GradientSpecs.h:14