10 #include "ismrmrd/export.h"
48 present_ = o.present_;
68 const T* operator->()
const {
72 const T& operator*()
const {
76 operator bool()
const {
80 bool is_present()
const {
84 bool has_value()
const noexcept {
91 throw std::runtime_error(
"Access optional value, which has not been set");
97 const T &value()
const &{
99 throw std::runtime_error(
"Access optional value, which has not been set");
106 throw std::runtime_error(
"Access optional value, which has not been set");
108 return std::move(value_);
111 const T &&value()
const &&{
113 throw std::runtime_error(
"Access optional value, which has not been set");
115 return std::move(value_);
119 return this->value();
123 return this->value();
125 const T &get()
const & {
126 return this->value();
129 const T&& get()
const &&{
130 return this->value();
133 T value_or(U &&default_value)
const &{
134 return bool(*
this) ? **this :
static_cast<T
>(std::forward<U>(default_value));
138 T value_or(U &&default_value) &&{
139 return bool(*
this) ? std::move(**
this) :
static_cast<T
>(std::forward<U>(default_value));
149 void set(
const T& v) {
182 std::string dependencyType;
183 std::string measurementID;
188 std::string referencedSOPInstanceUID;
196 std::string patientPosition;
200 std::vector<MeasurementDependency> measurementDependency;
203 std::vector<ReferencedImageSequence> referencedImageSequence;
208 unsigned short coilNumber;
209 std::string coilName;
219 std::vector<CoilLabel> coilLabel;
228 long int H1resonanceFrequency_Hz;
241 MatrixSize(
unsigned short x,
unsigned short y)
249 MatrixSize(
unsigned short x,
unsigned short y,
unsigned short z)
286 Limit(
unsigned short minimum,
unsigned short maximum,
unsigned short center)
294 unsigned short minimum;
295 unsigned short maximum;
296 unsigned short center;
335 std::vector<UserParameterLong> userParameterLong;
336 std::vector<UserParameterDouble> userParameterDouble;
337 std::vector<UserParameterString> userParameterString;
338 std::vector<UserParameterString> userParameterBase64;
343 std::string identifier;
344 std::vector<UserParameterLong> userParameterLong;
345 std::vector<UserParameterDouble> userParameterDouble;
351 unsigned short kspace_encoding_step_1;
352 unsigned short kspace_encoding_step_2;
362 enum class TrajectoryType {
376 TrajectoryType trajectory;
392 enum class WaveformType {
403 std::string waveformName;
404 WaveformType waveformType;
416 std::vector<Encoding> encoding;
419 std::vector<WaveformInformation> waveformInformation;
424 EXPORTISMRMRD
void deserialize(
const char* xml,
IsmrmrdHeader& h);
425 EXPORTISMRMRD
void serialize(
const IsmrmrdHeader& h, std::ostream& o);
429 #endif //ISMRMRDXML_H