msl 1.3.0
Loading...
Searching...
No Matches
Sampling.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 _7f064e65_5ad8_491f_8d3b_c32973a3e14f
5#define _7f064e65_5ad8_491f_8d3b_c32973a3e14f
6
7#include <MrMeasSrv/MeasUtils/NLSStatus.h>
8#include <MrMeasSrv/SeqIF/MDH/MdhProxy.h>
9
10#include <MrProtSrv/Domain/CoreNative/SeqLim.h>
11#include <MrProtSrv/Domain/MrProtData/MrProt/MrProt.h>
12#include <MrProtSrv/Domain/MrProtData/MrProt/SeqIF/SeqExpo.h>
13
14#include "msl/GradientSpecs.h"
15#include "msl/helpers.h"
16#include "msl/Readout.h"
17#include "msl/RealTimeEvents.h"
18#include "msl/Vector.h"
19
20namespace msl
21{
22
24class Sampling: public RealTimeEvents
25{
26public:
28
29 Sampling();
30 Sampling(Sampling const &) = default;
31 Sampling(Sampling &&) = default;
32 Sampling & operator=(Sampling const &) = default;
33 Sampling & operator=(Sampling &&) = default;
34 virtual ~Sampling() = default;
35
37 virtual double phase() const = 0;
38
40 virtual Sampling & setPhase(double phase) = 0;
41
43 virtual long contrast() const = 0;
44
46 virtual Sampling & setContrast(long contrast) = 0;
47
52 virtual long timeOffset() const = 0;
53
58 virtual Sampling & setTimeOffset(long timeOffset) = 0;
59
61 virtual GradientSpecs const & gradientSpecs() const = 0;
62
64 virtual Sampling & setGradientSpecs(GradientSpecs const & gradientSpecs) = 0;
65
67 std::size_t index() const;
68
70 Sampling & setIndex(std::size_t index);
71
76 std::size_t size() const;
77
82 virtual NLSStatus updateReadout(MrProt & protocol, SeqLim & limits, SeqExpo & exports) = 0;
83
85 virtual Readout const & readout() const = 0;
86
87protected:
89 std::size_t _size;
90
92 std::size_t _index;
93};
94
95}
96
97#endif // _7f064e65_5ad8_491f_8d3b_c32973a3e14f
Readout object, composed of an ADC, a gradient pulse and a pair of NCO.
Definition Readout.h:20
RealTimeEvents()
No-op constructor.
virtual GradientSpecs const & gradientSpecs() const =0
Return the gradient specifications constraining the read-out duration.
std::size_t size() const
Return the number of trajectories.
virtual Sampling & setTimeOffset(long timeOffset)=0
Set the time offset to get the effective echo time, accounting e.g. for the time of the excitation pu...
virtual Readout const & readout() const =0
Return a reference to the concrete readout.
virtual long contrast() const =0
Return the contrast number.
virtual double phase() const =0
Return the phase of the NCO during the readout.
virtual Sampling & setPhase(double phase)=0
Set the phase of the NCO during the readout.
Sampling & setIndex(std::size_t index)
Set the index of the current trajectory.
std::size_t _index
Index of the current item.
Definition Sampling.h:92
virtual Sampling & setContrast(long contrast)=0
Set the contrast number.
std::size_t _size
Number of items in the Sampling.
Definition Sampling.h:89
std::size_t index() const
Return the index of the current trajectory.
virtual NLSStatus updateReadout(MrProt &protocol, SeqLim &limits, SeqExpo &exports)=0
Update the readout with respect to index so that a subsequent call to readout() returns a readout mat...
virtual Sampling & setGradientSpecs(GradientSpecs const &gradientSpecs)=0
Set the gradient specifications constraining the read-out duration.
virtual long timeOffset() const =0
Return the time offset to get the effective echo time, accounting e.g. for the time of the excitation...
#define DECLARE_POINTERS(name)
Declare pointer type aliases.
Definition helpers.h:83
Top-level namespace of the msl library.
Definition acceleration.h:17
Specifications of the gradient system.
Definition GradientSpecs.h:14