ISMRMRD: ismrmrd.h Source File

ISMRMRD ISMRM Raw Data Format

Loading...
Searching...
No Matches
ismrmrd.h
Go to the documentation of this file.
1/* ISMRMRD MR Raw Data Strutures */
2/* DRAFT */
3/* Authors: */
4/* Michael S. Hansen (michael.hansen@nih.gov) */
5/* Brian Hargreaves (bah@stanford.edu) */
6/* Sebastian Kozerke (kozerke@biomed.ee.ethz.ch) */
7/* Kaveh Vahedipour (k.vahedipour@fz-juelich.de) */
8/* Hui Xue (hui.xue@nih.gov) */
9/* Souheil Inati (souheil.inati@nih.gov) */
10/* Joseph Naegele (joseph.naegele@nih.gov) */
11
12// clang-format off
13
19
20#pragma once
21#ifndef ISMRMRD_H
22#define ISMRMRD_H
23
24/* Language and cross platform section for defining types */
25/* integers */
26#include <stdint.h>
27#include <stddef.h> /* for size_t */
28
29#if __cplusplus > 199711L
30#include <type_traits>
31#endif
32
33/* Unaligned */
34#if defined(_MSC_VER) && __cplusplus > 199711L
35#define ISMRMRD_UNALIGNED __unaligned
36#else
37#define ISMRMRD_UNALIGNED
38#endif
39
40/* Complex numbers */
41#ifdef __cplusplus
42#include <complex>
43typedef std::complex<float> complex_float_t;
44typedef std::complex<double> complex_double_t;
45#else
46#ifdef _MSC_VER /* MS C compiler */
47typedef struct complex_float_t{
48 float real;
49 float imag;
50}complex_float_t;
51typedef struct complex_double_t{
52 double real;
53 double imag;
54}complex_double_t;
55#else /* C99 compiler */
56#include <complex.h>
57typedef float complex complex_float_t;
58typedef double complex complex_double_t;
59#endif /* _MSC_VER */
60#endif /* __cplusplus */
61
62/* Booleans - part of C++ */
63#ifndef __cplusplus
64#if defined (_MSC_VER) && (_MSC_VER < 1800) /* old MS C compiler */
65typedef int bool;
66#define false 0
67#define true 1
68#else /* C99 compiler */
69#include <stdbool.h>
70#endif /* _MSC_VER */
71#endif /* __cplusplus */
72
73/* Vectors */
74#ifdef __cplusplus
75#include "cpp98.h"
76#include <vector>
77#endif /* __cplusplus */
78
79/* Exports needed for MS C++ */
80#include "ismrmrd/export.h"
81
82#pragma pack(push, 2) /* Use 2 byte alignment */
83
84#ifdef __cplusplus
85namespace ISMRMRD {
86extern "C" {
87#endif
88
92 enum ISMRMRD_Constants {
93 ISMRMRD_USER_INTS = 8,
94 ISMRMRD_USER_FLOATS = 8,
95 ISMRMRD_PHYS_STAMPS = 3,
96 ISMRMRD_CHANNEL_MASKS = 16,
97 ISMRMRD_NDARRAY_MAXDIM = 7,
98 ISMRMRD_POSITION_LENGTH = 3,
99 ISMRMRD_DIRECTION_LENGTH = 3
100};
101
102
106 enum ISMRMRD_ErrorCodes {
107 ISMRMRD_BEGINERROR=-1,
108 ISMRMRD_NOERROR,
109 ISMRMRD_MEMORYERROR,
110 ISMRMRD_FILEERROR,
111 ISMRMRD_TYPEERROR,
112 ISMRMRD_RUNTIMEERROR,
113 ISMRMRD_HDF5ERROR,
114 ISMRMRD_ENDERROR
115};
116
120 enum ISMRMRD_DataTypes {
121 ISMRMRD_USHORT = 1,
122 ISMRMRD_SHORT = 2,
123 ISMRMRD_UINT = 3,
124 ISMRMRD_INT = 4,
125 ISMRMRD_FLOAT = 5,
126 ISMRMRD_DOUBLE = 6,
127 ISMRMRD_CXFLOAT = 7,
128 ISMRMRD_CXDOUBLE = 8
129};
130
132EXPORTISMRMRD size_t ismrmrd_sizeof_data_type(int data_type);
133
137 enum ISMRMRD_AcquisitionFlags {
138 ISMRMRD_ACQ_FIRST_IN_ENCODE_STEP1 = 1,
139 ISMRMRD_ACQ_LAST_IN_ENCODE_STEP1 = 2,
140 ISMRMRD_ACQ_FIRST_IN_ENCODE_STEP2 = 3,
141 ISMRMRD_ACQ_LAST_IN_ENCODE_STEP2 = 4,
142 ISMRMRD_ACQ_FIRST_IN_AVERAGE = 5,
143 ISMRMRD_ACQ_LAST_IN_AVERAGE = 6,
144 ISMRMRD_ACQ_FIRST_IN_SLICE = 7,
145 ISMRMRD_ACQ_LAST_IN_SLICE = 8,
146 ISMRMRD_ACQ_FIRST_IN_CONTRAST = 9,
147 ISMRMRD_ACQ_LAST_IN_CONTRAST = 10,
148 ISMRMRD_ACQ_FIRST_IN_PHASE = 11,
149 ISMRMRD_ACQ_LAST_IN_PHASE = 12,
150 ISMRMRD_ACQ_FIRST_IN_REPETITION = 13,
151 ISMRMRD_ACQ_LAST_IN_REPETITION = 14,
152 ISMRMRD_ACQ_FIRST_IN_SET = 15,
153 ISMRMRD_ACQ_LAST_IN_SET = 16,
154 ISMRMRD_ACQ_FIRST_IN_SEGMENT = 17,
155 ISMRMRD_ACQ_LAST_IN_SEGMENT = 18,
156 ISMRMRD_ACQ_IS_NOISE_MEASUREMENT = 19,
157 ISMRMRD_ACQ_IS_PARALLEL_CALIBRATION = 20,
158 ISMRMRD_ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING = 21,
159 ISMRMRD_ACQ_IS_REVERSE = 22,
160 ISMRMRD_ACQ_IS_NAVIGATION_DATA = 23,
161 ISMRMRD_ACQ_IS_PHASECORR_DATA = 24,
162 ISMRMRD_ACQ_LAST_IN_MEASUREMENT = 25,
163 ISMRMRD_ACQ_IS_HPFEEDBACK_DATA = 26,
164 ISMRMRD_ACQ_IS_DUMMYSCAN_DATA = 27,
165 ISMRMRD_ACQ_IS_RTFEEDBACK_DATA = 28,
166 ISMRMRD_ACQ_IS_SURFACECOILCORRECTIONSCAN_DATA = 29,
167 ISMRMRD_ACQ_IS_PHASE_STABILIZATION_REFERENCE = 30,
168 ISMRMRD_ACQ_IS_PHASE_STABILIZATION = 31,
169
170
171 ISMRMRD_ACQ_COMPRESSION1 = 53,
172 ISMRMRD_ACQ_COMPRESSION2 = 54,
173 ISMRMRD_ACQ_COMPRESSION3 = 55,
174 ISMRMRD_ACQ_COMPRESSION4 = 56,
175 ISMRMRD_ACQ_USER1 = 57,
176 ISMRMRD_ACQ_USER2 = 58,
177 ISMRMRD_ACQ_USER3 = 59,
178 ISMRMRD_ACQ_USER4 = 60,
179 ISMRMRD_ACQ_USER5 = 61,
180 ISMRMRD_ACQ_USER6 = 62,
181 ISMRMRD_ACQ_USER7 = 63,
182 ISMRMRD_ACQ_USER8 = 64
183};
184
188 enum ISMRMRD_ImageTypes {
189 ISMRMRD_IMTYPE_MAGNITUDE = 1,
190 ISMRMRD_IMTYPE_PHASE = 2,
191 ISMRMRD_IMTYPE_REAL = 3,
192 ISMRMRD_IMTYPE_IMAG = 4,
193 ISMRMRD_IMTYPE_COMPLEX = 5
194};
195
199 enum ISMRMRD_ImageFlags {
200 ISMRMRD_IMAGE_IS_NAVIGATION_DATA = 1,
201 ISMRMRD_IMAGE_FIRST_IN_AVERAGE = 5,
202 ISMRMRD_IMAGE_LAST_IN_AVERAGE = 6,
203 ISMRMRD_IMAGE_FIRST_IN_SLICE = 7,
204 ISMRMRD_IMAGE_LAST_IN_SLICE = 8,
205 ISMRMRD_IMAGE_FIRST_IN_CONTRAST = 9,
206 ISMRMRD_IMAGE_LAST_IN_CONTRAST = 10,
207 ISMRMRD_IMAGE_FIRST_IN_PHASE = 11,
208 ISMRMRD_IMAGE_LAST_IN_PHASE = 12,
209 ISMRMRD_IMAGE_FIRST_IN_REPETITION = 13,
210 ISMRMRD_IMAGE_LAST_IN_REPETITION = 14,
211 ISMRMRD_IMAGE_FIRST_IN_SET = 15,
212 ISMRMRD_IMAGE_LAST_IN_SET = 16,
213 ISMRMRD_IMAGE_USER1 = 57,
214 ISMRMRD_IMAGE_USER2 = 58,
215 ISMRMRD_IMAGE_USER3 = 59,
216 ISMRMRD_IMAGE_USER4 = 60,
217 ISMRMRD_IMAGE_USER5 = 61,
218 ISMRMRD_IMAGE_USER6 = 62,
219 ISMRMRD_IMAGE_USER7 = 63,
220 ISMRMRD_IMAGE_USER8 = 64
221};
222
226 typedef struct ISMRMRD_EncodingCounters {
227 uint16_t kspace_encode_step_1;
228 uint16_t kspace_encode_step_2;
229 uint16_t average;
230 uint16_t slice;
231 uint16_t contrast;
232 uint16_t phase;
233 uint16_t repetition;
234 uint16_t set;
235 uint16_t segment;
236 uint16_t user[ISMRMRD_USER_INTS];
237} ISMRMRD_EncodingCounters;
238
239#if __cplusplus > 199711L // Static assert requires C++11
240// Check standard layout
241static_assert(std::is_standard_layout<ISMRMRD_EncodingCounters>::value, "ISMRMRD_EncodingCounters is not a standard layout type");
242// Check for size and offset of EncodingCounters struct members
243static_assert(sizeof(ISMRMRD_EncodingCounters) == 34, "ISMRMRD_EncodingCounters is not the expected size");
244static_assert(offsetof(ISMRMRD_EncodingCounters, kspace_encode_step_1) == 0, "kspace_encode_step_1 is not at the expected offset");
245static_assert(offsetof(ISMRMRD_EncodingCounters, kspace_encode_step_2) == 2, "kspace_encode_step_2 is not at the expected offset");
246static_assert(offsetof(ISMRMRD_EncodingCounters, average) == 4, "average is not at the expected offset");
247static_assert(offsetof(ISMRMRD_EncodingCounters, slice) == 6, "slice is not at the expected offset");
248static_assert(offsetof(ISMRMRD_EncodingCounters, contrast) == 8, "contrast is not at the expected offset");
249static_assert(offsetof(ISMRMRD_EncodingCounters, phase) == 10, "phase is not at the expected offset");
250static_assert(offsetof(ISMRMRD_EncodingCounters, repetition) == 12, "repetition is not at the expected offset");
251static_assert(offsetof(ISMRMRD_EncodingCounters, set) == 14, "set is not at the expected offset");
252static_assert(offsetof(ISMRMRD_EncodingCounters, segment) == 16, "segment is not at the expected offset");
253static_assert(offsetof(ISMRMRD_EncodingCounters, user) == 18, "user is not at the expected offset");
254#endif
255
259 typedef struct ISMRMRD_AcquisitionHeader {
260 uint16_t version;
261 uint64_t flags;
262 uint32_t measurement_uid;
263 uint32_t scan_counter;
264 uint32_t acquisition_time_stamp;
265 uint32_t physiology_time_stamp[ISMRMRD_PHYS_STAMPS];
266 uint16_t number_of_samples;
267 uint16_t available_channels;
268 uint16_t active_channels;
269 uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS];
270 uint16_t discard_pre;
271 uint16_t discard_post;
272 uint16_t center_sample;
273 uint16_t encoding_space_ref;
274 uint16_t trajectory_dimensions;
275 float sample_time_us;
276 float position[3];
277 float read_dir[3];
278 float phase_dir[3];
279 float slice_dir[3];
280 float patient_table_position[3];
281 ISMRMRD_EncodingCounters idx;
282 int32_t user_int[ISMRMRD_USER_INTS];
283 float user_float[ISMRMRD_USER_FLOATS];
284} ISMRMRD_AcquisitionHeader;
285
286#if __cplusplus > 199711L // Static assert requires C++11
287// Check standard layout
288static_assert(std::is_standard_layout<ISMRMRD_AcquisitionHeader>::value, "ISMRMRD_AcquisitionHeader is not a standard layout type");
289// Check for size and offset of AcquisitionHeader struct members
290static_assert(sizeof(ISMRMRD_AcquisitionHeader) == 340, "ISMRMRD_AcquisitionHeader is not the expected size");
291static_assert(offsetof(ISMRMRD_AcquisitionHeader, version) == 0, "version is not at the expected offset");
292static_assert(offsetof(ISMRMRD_AcquisitionHeader, flags) == 2, "flags is not at the expected offset");
293static_assert(offsetof(ISMRMRD_AcquisitionHeader, measurement_uid) == 10, "measurement_uid is not at the expected offset");
294static_assert(offsetof(ISMRMRD_AcquisitionHeader, scan_counter) == 14, "scan_counter is not at the expected offset");
295static_assert(offsetof(ISMRMRD_AcquisitionHeader, acquisition_time_stamp) == 18, "acquisition_time_stamp is not at the expected offset");
296static_assert(offsetof(ISMRMRD_AcquisitionHeader, physiology_time_stamp) == 22, "physiology_time_stamp is not at the expected offset");
297static_assert(offsetof(ISMRMRD_AcquisitionHeader, number_of_samples) == 34, "number_of_samples is not at the expected offset");
298static_assert(offsetof(ISMRMRD_AcquisitionHeader, available_channels) == 36, "available_channels is not at the expected offset");
299static_assert(offsetof(ISMRMRD_AcquisitionHeader, active_channels) == 38, "active_channels is not at the expected offset");
300static_assert(offsetof(ISMRMRD_AcquisitionHeader, channel_mask) == 40, "channel_mask is not at the expected offset");
301static_assert(offsetof(ISMRMRD_AcquisitionHeader, discard_pre) == 168, "discard_pre is not at the expected offset");
302static_assert(offsetof(ISMRMRD_AcquisitionHeader, discard_post) == 170, "discard_post is not at the expected offset");
303static_assert(offsetof(ISMRMRD_AcquisitionHeader, center_sample) == 172, "center_sample is not at the expected offset");
304static_assert(offsetof(ISMRMRD_AcquisitionHeader, encoding_space_ref) == 174, "encoding_space_ref is not at the expected offset");
305static_assert(offsetof(ISMRMRD_AcquisitionHeader, trajectory_dimensions) == 176, "trajectory_dimensions is not at the expected offset");
306static_assert(offsetof(ISMRMRD_AcquisitionHeader, sample_time_us) == 178, "sample_time_us is not at the expected offset");
307static_assert(offsetof(ISMRMRD_AcquisitionHeader, position) == 182, "position is not at the expected offset");
308static_assert(offsetof(ISMRMRD_AcquisitionHeader, read_dir) == 194, "read_dir is not at the expected offset");
309static_assert(offsetof(ISMRMRD_AcquisitionHeader, phase_dir) == 206, "phase_dir is not at the expected offset");
310static_assert(offsetof(ISMRMRD_AcquisitionHeader, slice_dir) == 218, "slice_dir is not at the expected offset");
311static_assert(offsetof(ISMRMRD_AcquisitionHeader, patient_table_position) == 230, "patient_table_position is not at the expected offset");
312static_assert(offsetof(ISMRMRD_AcquisitionHeader, idx) == 242, "idx is not at the expected offset");
313static_assert(offsetof(ISMRMRD_AcquisitionHeader, user_int) == 276, "user_int is not at the expected offset");
314static_assert(offsetof(ISMRMRD_AcquisitionHeader, user_float) == 308, "user_float is not at the expected offset");
315#endif
316
322EXPORTISMRMRD int ismrmrd_init_acquisition_header(ISMRMRD_AcquisitionHeader *hdr);
323
325 typedef struct ISMRMRD_Acquisition {
326 ISMRMRD_AcquisitionHeader head;
327 float *traj;
328 complex_float_t *data;
329} ISMRMRD_Acquisition;
330
334EXPORTISMRMRD ISMRMRD_Acquisition * ismrmrd_create_acquisition();
335EXPORTISMRMRD int ismrmrd_free_acquisition(ISMRMRD_Acquisition *acq);
336EXPORTISMRMRD int ismrmrd_init_acquisition(ISMRMRD_Acquisition *acq);
337EXPORTISMRMRD int ismrmrd_cleanup_acquisition(ISMRMRD_Acquisition *acq);
338EXPORTISMRMRD int ismrmrd_copy_acquisition(ISMRMRD_Acquisition *acqdest, const ISMRMRD_Acquisition *acqsource);
339EXPORTISMRMRD int ismrmrd_make_consistent_acquisition(ISMRMRD_Acquisition *acq);
340EXPORTISMRMRD size_t ismrmrd_size_of_acquisition_traj(const ISMRMRD_Acquisition *acq);
341EXPORTISMRMRD size_t ismrmrd_size_of_acquisition_data(const ISMRMRD_Acquisition *acq);
343
344/**********/
345/* Images */
346/**********/
347
351 typedef struct ISMRMRD_ImageHeader {
352 uint16_t version;
353 uint16_t data_type;
354 uint64_t flags;
355 uint32_t measurement_uid;
356 uint16_t matrix_size[3];
357 float field_of_view[3];
358 uint16_t channels;
359 float position[3];
360 float read_dir[3];
361 float phase_dir[3];
362 float slice_dir[3];
363 float patient_table_position[3];
364 uint16_t average;
365 uint16_t slice;
366 uint16_t contrast;
367 uint16_t phase;
368 uint16_t repetition;
369 uint16_t set;
370 uint32_t acquisition_time_stamp;
371 uint32_t physiology_time_stamp[ISMRMRD_PHYS_STAMPS];
372 uint16_t image_type;
373 uint16_t image_index;
374 uint16_t image_series_index;
375 int32_t user_int[ISMRMRD_USER_INTS];
376 float user_float[ISMRMRD_USER_FLOATS];
377 uint32_t attribute_string_len;
378} ISMRMRD_ImageHeader;
379
380#if __cplusplus > 199711L // Static assert requires C++11
381// Check standard layout
382static_assert(std::is_standard_layout<ISMRMRD_ImageHeader>::value, "ISMRMRD_ImageHeader is not a standard layout type");
383// Check size and offsets of ISMRMRD_ImageHeader
384static_assert(sizeof(ISMRMRD_ImageHeader) == 198, "ISMRMRD_ImageHeader is not the expected size");
385static_assert(offsetof(ISMRMRD_ImageHeader, version) == 0, "version is not at the expected offset");
386static_assert(offsetof(ISMRMRD_ImageHeader, data_type) == 2, "data_type is not at the expected offset");
387static_assert(offsetof(ISMRMRD_ImageHeader, flags) == 4, "flags is not at the expected offset");
388static_assert(offsetof(ISMRMRD_ImageHeader, measurement_uid) == 12, "measurement_uid is not at the expected offset");
389static_assert(offsetof(ISMRMRD_ImageHeader, matrix_size) == 16, "matrix_size is not at the expected offset");
390static_assert(offsetof(ISMRMRD_ImageHeader, field_of_view) == 22, "field_of_view is not at the expected offset");
391static_assert(offsetof(ISMRMRD_ImageHeader, channels) == 34, "channels is not at the expected offset");
392static_assert(offsetof(ISMRMRD_ImageHeader, position) == 36, "position is not at the expected offset");
393static_assert(offsetof(ISMRMRD_ImageHeader, read_dir) == 48, "read_dir is not at the expected offset");
394static_assert(offsetof(ISMRMRD_ImageHeader, phase_dir) == 60, "phase_dir is not at the expected offset");
395static_assert(offsetof(ISMRMRD_ImageHeader, slice_dir) == 72, "slice_dir is not at the expected offset");
396static_assert(offsetof(ISMRMRD_ImageHeader, patient_table_position) == 84, "patient_table_position is not at the expected offset");
397static_assert(offsetof(ISMRMRD_ImageHeader, average) == 96, "average is not at the expected offset");
398static_assert(offsetof(ISMRMRD_ImageHeader, slice) == 98, "slice is not at the expected offset");
399static_assert(offsetof(ISMRMRD_ImageHeader, contrast) == 100, "contrast is not at the expected offset");
400static_assert(offsetof(ISMRMRD_ImageHeader, phase) == 102, "phase is not at the expected offset");
401static_assert(offsetof(ISMRMRD_ImageHeader, repetition) == 104, "repetition is not at the expected offset");
402static_assert(offsetof(ISMRMRD_ImageHeader, set) == 106, "set is not at the expected offset");
403static_assert(offsetof(ISMRMRD_ImageHeader, acquisition_time_stamp) == 108, "acquisition_time_stamp is not at the expected offset");
404static_assert(offsetof(ISMRMRD_ImageHeader, physiology_time_stamp) == 112, "physiology_time_stamp is not at the expected offset");
405static_assert(offsetof(ISMRMRD_ImageHeader, image_type) == 124, "image_type is not at the expected offset");
406static_assert(offsetof(ISMRMRD_ImageHeader, image_index) == 126, "image_index is not at the expected offset");
407static_assert(offsetof(ISMRMRD_ImageHeader, image_series_index) == 128, "image_series_index is not at the expected offset");
408static_assert(offsetof(ISMRMRD_ImageHeader, user_int) == 130, "user_int is not at the expected offset");
409static_assert(offsetof(ISMRMRD_ImageHeader, user_float) == 162, "user_float is not at the expected offset");
410static_assert(offsetof(ISMRMRD_ImageHeader, attribute_string_len) == 194, "attribute_string_len is not at the expected offset");
411#endif
412
414EXPORTISMRMRD int ismrmrd_init_image_header(ISMRMRD_ImageHeader *hdr);
415
420 typedef struct ISMRMRD_Image {
421 ISMRMRD_ImageHeader head;
422 char *attribute_string;
423 void *data;
424} ISMRMRD_Image;
425
426
430EXPORTISMRMRD ISMRMRD_Image * ismrmrd_create_image();
431EXPORTISMRMRD int ismrmrd_free_image(ISMRMRD_Image *im);
432EXPORTISMRMRD int ismrmrd_init_image(ISMRMRD_Image *im);
433EXPORTISMRMRD int ismrmrd_cleanup_image(ISMRMRD_Image *im);
434EXPORTISMRMRD int ismrmrd_copy_image(ISMRMRD_Image *imdest, const ISMRMRD_Image *imsource);
435EXPORTISMRMRD int ismrmrd_make_consistent_image(ISMRMRD_Image *im);
436EXPORTISMRMRD size_t ismrmrd_size_of_image_attribute_string(const ISMRMRD_Image *im);
437EXPORTISMRMRD size_t ismrmrd_size_of_image_data(const ISMRMRD_Image *im);
439
440/************/
441/* NDArrays */
442/************/
443
447 typedef struct ISMRMRD_NDArray {
448 uint16_t version;
449 uint16_t data_type;
450 uint16_t ndim;
451 size_t dims[ISMRMRD_NDARRAY_MAXDIM];
452 void *data;
453} ISMRMRD_NDArray;
454
458EXPORTISMRMRD ISMRMRD_NDArray * ismrmrd_create_ndarray();
459EXPORTISMRMRD int ismrmrd_free_ndarray(ISMRMRD_NDArray *arr);
460EXPORTISMRMRD int ismrmrd_init_ndarray(ISMRMRD_NDArray *arr);
461EXPORTISMRMRD int ismrmrd_cleanup_ndarray(ISMRMRD_NDArray *arr);
462EXPORTISMRMRD int ismrmrd_copy_ndarray(ISMRMRD_NDArray *arrdest, const ISMRMRD_NDArray *arrsource);
463EXPORTISMRMRD int ismrmrd_make_consistent_ndarray(ISMRMRD_NDArray *arr);
464EXPORTISMRMRD size_t ismrmrd_size_of_ndarray_data(const ISMRMRD_NDArray *arr);
466
467/*********/
468/* Flags */
469/*********/
473EXPORTISMRMRD bool ismrmrd_is_flag_set(const uint64_t flags, const uint64_t val);
474EXPORTISMRMRD int ismrmrd_set_flag(ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val);
475EXPORTISMRMRD int ismrmrd_set_flags(ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val);
476EXPORTISMRMRD int ismrmrd_clear_flag(ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val);
477EXPORTISMRMRD int ismrmrd_clear_all_flags(ISMRMRD_UNALIGNED uint64_t *flags);
479
480/*****************/
481/* Channel Masks */
482/*****************/
486EXPORTISMRMRD bool ismrmrd_is_channel_on(const uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan);
487EXPORTISMRMRD int ismrmrd_set_channel_on(uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan);
488EXPORTISMRMRD int ismrmrd_set_channel_off(uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan);
489EXPORTISMRMRD int ismrmrd_set_all_channels_off(uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS]);
491
492/******************/
493/* Error Handling */
494/******************/
498typedef void (*ismrmrd_error_handler_t)(const char *file, int line,
499 const char *function, int code, const char *msg);
500#define ISMRMRD_PUSH_ERR(code, msg) ismrmrd_push_error(__FILE__, __LINE__, \
501 __func__, (code), (msg))
502int ismrmrd_push_error(const char *file, const int line, const char *func,
503 const int code, const char *msg);
505EXPORTISMRMRD void ismrmrd_set_error_handler(ismrmrd_error_handler_t);
507EXPORTISMRMRD const char *ismrmrd_strerror(int code);
509
512bool ismrmrd_pop_error(char **file, int *line, char **func,
513 int *code, char **msg);
514
515/*****************************/
516/* Rotations and Quaternions */
517/*****************************/
522EXPORTISMRMRD int ismrmrd_sign_of_directions(float const read_dir[3], float const phase_dir[3], float const slice_dir[3]);
523
525EXPORTISMRMRD void ismrmrd_directions_to_quaternion(float const read_dir[3], float const phase_dir[3], float const slice_dir[3], float quat[4]);
526
528EXPORTISMRMRD void ismrmrd_quaternion_to_directions(float const quat[4], float read_dir[3], float phase_dir[3], float slice_dir[3]);
530
531#pragma pack(pop) /* Restore old alignment */
532
533#ifdef __cplusplus
534} // extern "C"
535
537
539std::string build_exception_string(void);
540
542 typedef ISMRMRD_EncodingCounters EncodingCounters;
543
544
548
549
550bool operator==(const EncodingCounters& ec1, const EncodingCounters& ec2);
551
553 template <typename T> EXPORTISMRMRD ISMRMRD_DataTypes get_data_type();
554
556 class EXPORTISMRMRD FlagBit
557{
558public:
559 FlagBit(unsigned short b)
560 : bitmask_(0)
561 {
562 if (b > 0) {
563 bitmask_ = 1;
564 bitmask_ = (bitmask_ << (b-1));
565 }
566 }
567
568 bool isSet(const uint64_t& m) const {
569 return ((m & bitmask_)>0);
570 }
571
572 uint64_t bitmask_;
573
574};
575
577 class EXPORTISMRMRD AcquisitionHeader: public ISMRMRD_AcquisitionHeader {
578public:
579 // Constructors
580 AcquisitionHeader();
581
582
583 bool operator==(const AcquisitionHeader& acq) const;
584
585 // Flag methods
586 bool isFlagSet(const ISMRMRD_AcquisitionFlags val) const;
587 void setFlag(const ISMRMRD_AcquisitionFlags val);
588 void clearFlag(const ISMRMRD_AcquisitionFlags val);
589 void clearAllFlags();
590
591 // Channel mask methods
592 bool isChannelActive(uint16_t channel_id) const;
593 void setChannelActive(uint16_t channel_id);
594 void setChannelNotActive(uint16_t channel_id);
595 void setAllChannelsNotActive();
596
597};
598
599#if __cplusplus > 199711L // Static assert and is_standard_layout requires C++11
600static_assert(sizeof(AcquisitionHeader) == sizeof(ISMRMRD_AcquisitionHeader), "AcquisitionHeader size mismatch");
601static_assert(std::is_standard_layout<AcquisitionHeader>::value, "AcquisitionHeader is not a standard layout type");
602#endif
603
605 class EXPORTISMRMRD Acquisition {
606 friend class Dataset;
607public:
608 // Constructors, assignment, destructor
609 Acquisition();
610 Acquisition(uint16_t num_samples, uint16_t active_channels=1, uint16_t trajectory_dimensions=0);
611 Acquisition(const Acquisition &other);
612 Acquisition & operator= (const Acquisition &other);
613 ~Acquisition();
614
615 // Accessors and mutators
616 uint16_t version() const;
617 uint64_t flags() const;
618 uint32_t &measurement_uid();
619 uint32_t &scan_counter();
620 uint32_t &acquisition_time_stamp();
621 uint32_t (&physiology_time_stamp())[ISMRMRD_PHYS_STAMPS];
622 const uint16_t &number_of_samples();
623 uint16_t &available_channels();
624 const uint16_t &active_channels();
625 const uint64_t (&channel_mask())[ISMRMRD_CHANNEL_MASKS];
626 uint16_t &discard_pre();
627 uint16_t &discard_post();
628 uint16_t &center_sample();
629 uint16_t &encoding_space_ref();
630 const uint16_t &trajectory_dimensions();
631 float &sample_time_us();
632 float (&position())[3];
633 float (&read_dir())[3];
634 float (&phase_dir())[3];
635 float (&slice_dir())[3];
636 float (&patient_table_position())[3];
637 ISMRMRD_EncodingCounters &idx();
638 int32_t (&user_int())[ISMRMRD_USER_INTS];
639 float (&user_float())[ISMRMRD_USER_FLOATS];
640
641
642 uint32_t measurement_uid() const;
643 uint32_t scan_counter() const;
644 uint32_t acquisition_time_stamp() const;
645 const uint32_t (&physiology_time_stamp() const )[ISMRMRD_PHYS_STAMPS];
646 uint16_t number_of_samples() const;
647 uint16_t available_channels() const;
648 uint16_t active_channels() const;
649 const uint64_t (&channel_mask() const)[ISMRMRD_CHANNEL_MASKS];
650 uint16_t discard_pre() const;
651 uint16_t discard_post() const;
652 uint16_t center_sample() const;
653 uint16_t encoding_space_ref() const;
654 uint16_t trajectory_dimensions() const;
655 float sample_time_us() const;
656 const float (&position() const)[3];
657 const float (&read_dir() const)[3];
658 const float (&phase_dir() const)[3];
659 const float (&slice_dir() const)[3];
660 const float (&patient_table_position() const)[3];
661 const ISMRMRD_EncodingCounters &idx() const;
662 const int32_t (&user_int() const)[ISMRMRD_USER_INTS];
663 const float (&user_float() const)[ISMRMRD_USER_FLOATS];
664
665 // Sizes
666 void resize(uint16_t num_samples, uint16_t active_channels=1, uint16_t trajectory_dimensions=0);
667 size_t getNumberOfDataElements() const;
668 size_t getNumberOfTrajElements() const;
669 size_t getDataSize() const;
670 size_t getTrajSize() const;
671
672 // Header, data and trajectory accessors
673 const AcquisitionHeader &getHead() const;
674 void setHead(const AcquisitionHeader &other);
675
679 const complex_float_t * getDataPtr() const;
680 complex_float_t * getDataPtr();
681
685 complex_float_t & data(uint16_t sample, uint16_t channel);
686
690 void setData(complex_float_t * data);
691
695 complex_float_t * data_begin();
696 const complex_float_t * data_begin() const;
697
701 complex_float_t * data_end();
702 const complex_float_t * data_end() const;
703
707 const float * getTrajPtr() const;
708 float * getTrajPtr();
709
713 float & traj(uint16_t dimension, uint16_t sample);
714
718 void setTraj(float * traj);
719
723 float * traj_begin();
724 const float * traj_begin() const;
725
729 float * traj_end();
730 const float * traj_end() const;
731
732 // Flag methods
733 bool isFlagSet(const uint64_t val) const;
734 void setFlag(const uint64_t val);
735 void clearFlag(const uint64_t val);
736 void clearAllFlags();
737
738 bool isFlagSet(const FlagBit &val) const { return isFlagSet(val.bitmask_); }
739 void setFlag(const FlagBit &val) { setFlag(val.bitmask_); }
740 void clearFlag(const FlagBit &val) { clearFlag(val.bitmask_); }
741
742 // Channel mask methods
743 bool isChannelActive(uint16_t channel_id) const;
744 void setChannelActive(uint16_t channel_id);
745 void setChannelNotActive(uint16_t channel_id);
746 void setAllChannelsNotActive();
747
748protected:
749 ISMRMRD_Acquisition acq;
750};
751
753 class EXPORTISMRMRD ImageHeader: public ISMRMRD_ImageHeader {
754public:
755 // Constructor
756 ImageHeader();
757
758 // Flag methods
759 bool isFlagSet(const uint64_t val) const;
760 void setFlag(const uint64_t val);
761 void clearFlag(const uint64_t val);
762 void clearAllFlags();
763
764};
765
766#if __cplusplus > 199711L // Static assert and is_standard_layout requires C++11
767static_assert(sizeof(ImageHeader) == sizeof(ISMRMRD_ImageHeader), "ImageHeader size mismatch");
768static_assert(std::is_standard_layout<ImageHeader>::value, "ImageHeader is not a standard layout type");
769#endif
770
772 template <typename T> class EXPORTISMRMRD Image {
773 friend class Dataset;
774public:
775 // Constructors
776 Image(uint16_t matrix_size_x = 0, uint16_t matrix_size_y = 1,
777 uint16_t matrix_size_z = 1, uint16_t channels = 1);
778 Image(const Image &other);
779 Image & operator= (const Image &other);
780 ~Image();
781
782 // Image dimensions
783 void resize(uint16_t matrix_size_x, uint16_t matrix_size_y, uint16_t matrix_size_z, uint16_t channels);
784 uint16_t getMatrixSizeX() const;
785 void setMatrixSizeX(uint16_t matrix_size_x);
786 uint16_t getMatrixSizeY() const;
787 void setMatrixSizeY(uint16_t matrix_size_y);
788 uint16_t getMatrixSizeZ() const;
789 void setMatrixSizeZ(uint16_t matrix_size_z);
790 uint16_t getNumberOfChannels() const;
791 void setNumberOfChannels(uint16_t channels);
792
793 // Field of view
794 void setFieldOfView(float fov_x, float fov_y, float fov_z);
795 float getFieldOfViewX() const;
796 void setFieldOfViewX(float f);
797 float getFieldOfViewY() const;
798 void setFieldOfViewY(float f);
799 float getFieldOfViewZ() const;
800 void setFieldOfViewZ(float f);
801
802 // Positions and orientations
803 void setPosition(float x, float y, float z);
804 float getPositionX() const;
805 void setPositionX(float x);
806 float getPositionY() const;
807 void setPositionY(float y);
808 float getPositionZ() const;
809 void setPositionZ(float z);
810
811 void setReadDirection(float x, float y, float z);
812 float getReadDirectionX() const;
813 void setReadDirectionX(float x);
814 float getReadDirectionY() const;
815 void setReadDirectionY(float y);
816 float getReadDirectionZ() const;
817 void setReadDirectionZ(float z);
818
819 void setPhaseDirection(float x, float y, float z);
820 float getPhaseDirectionX() const;
821 void setPhaseDirectionX(float x);
822 float getPhaseDirectionY() const;
823 void setPhaseDirectionY(float y);
824 float getPhaseDirectionZ() const;
825 void setPhaseDirectionZ(float z);
826
827 void setSliceDirection(float x, float y, float z);
828 float getSliceDirectionX() const;
829 void setSliceDirectionX(float x);
830 float getSliceDirectionY() const;
831 void setSliceDirectionY(float y);
832 float getSliceDirectionZ() const;
833 void setSliceDirectionZ(float z);
834
835 void setPatientTablePosition(float x, float y, float z);
836 float getPatientTablePositionX() const;
837 void setPatientTablePositionX(float x);
838 float getPatientTablePositionY() const;
839 void setPatientTablePositionY(float y);
840 float getPatientTablePositionZ() const;
841 void setPatientTablePositionZ(float z);
842
843
844 // Attributes
845 uint16_t getVersion() const;
846 ISMRMRD_DataTypes getDataType() const;
847
848 // Counters and labels
849 uint32_t getMeasurementUid() const;
850 void setMeasurementUid(uint32_t measurement_uid);
851
852 uint16_t getAverage() const;
853 void setAverage(uint16_t average);
854
855 uint16_t getSlice() const;
856 void setSlice(uint16_t slice);
857
858 uint16_t getContrast() const;
859 void setContrast(uint16_t contrast);
860
861 uint16_t getPhase() const;
862 void setPhase(uint16_t phase);
863
864 uint16_t getRepetition() const;
865 void setRepetition(uint16_t repetition);
866
867 uint16_t getSet() const;
868 void setSet(uint16_t set);
869
870 uint32_t getAcquisitionTimeStamp() const;
871 void setAcquisitionTimeStamp(uint32_t acquisition_time_stamp);
872
873 uint32_t getPhysiologyTimeStamp(unsigned int stamp_id) const;
874 void setPhysiologyTimeStamp(unsigned int stamp_id, uint32_t value);
875
876 uint16_t getImageType() const;
877 void setImageType(uint16_t image_type);
878
879 uint16_t getImageIndex() const;
880 void setImageIndex(uint16_t image_index);
881
882 uint16_t getImageSeriesIndex() const;
883 void setImageSeriesIndex(uint16_t image_series_index);
884
885 // User parameters
886 float getUserFloat(unsigned int index) const;
887 void setUserFloat(unsigned int index, float value);
888
889 int32_t getUserInt(unsigned int index) const;
890 void setUserInt(unsigned int index, int32_t value);
891
892 // Flags
893 uint64_t getFlags() const;
894 void setFlags(const uint64_t flags);
895 bool isFlagSet(const uint64_t val) const;
896 void setFlag(const uint64_t val);
897 void clearFlag(const uint64_t val);
898 void clearAllFlags();
899
900 // Header
901 ImageHeader & getHead();
902 const ImageHeader & getHead() const;
903 void setHead(const ImageHeader& head);
904
905 // Attribute string
906 void getAttributeString(std::string &attr) const;
907 const char *getAttributeString() const;
908 void setAttributeString(const std::string &attr);
909 void setAttributeString(const char *attr);
910 size_t getAttributeStringLength() const;
911
912 // Data
913 T * getDataPtr();
914 const T * getDataPtr() const;
916 size_t getNumberOfDataElements() const;
918 size_t getDataSize() const;
919
921 T* begin();
922
924 T* end();
925
927 T & operator () (uint16_t x, uint16_t y=0, uint16_t z=0 , uint16_t channel =0);
928
929protected:
930 ISMRMRD_Image im;
931};
932
934 template <typename T> class EXPORTISMRMRD NDArray {
935 friend class Dataset;
936public:
937 // Constructors, destructor and copy
938 NDArray();
939 NDArray(const std::vector<size_t> dimvec);
940 NDArray(const NDArray<T> &other);
941 ~NDArray();
942 NDArray<T> & operator= (const NDArray<T> &other);
943
944 // Accessors and mutators
945 ISMRMRD_DataTypes getDataType() const;
946 uint16_t getVersion() const;
947 uint16_t getNDim() const;
948 const size_t (&getDims() const)[ISMRMRD_NDARRAY_MAXDIM];
949 size_t getDataSize() const;
950 void resize(const std::vector<size_t> dimvec);
951 size_t getNumberOfElements() const;
952 T * getDataPtr();
953 const T * getDataPtr() const;
954
956 T * begin();
957
959 T* end();
960
962 T & operator () (uint16_t x, uint16_t y=0, uint16_t z=0, uint16_t w=0, uint16_t n=0, uint16_t m=0, uint16_t l=0);
963
964protected:
965 ISMRMRD_NDArray arr;
966};
967
968
970
971} // namespace ISMRMRD
972
973#endif
974
975#endif /* ISMRMRD_H */
ISMRMRD::AcquisitionHeader
Header for MR Acquisition type.
Definition ismrmrd.h:577
ISMRMRD::Acquisition::traj_end
float * traj_end()
Definition ismrmrd.cpp:427
ISMRMRD::Acquisition::traj
float & traj(uint16_t dimension, uint16_t sample)
Definition ismrmrd.cpp:395
ISMRMRD::Acquisition::data
complex_float_t & data(uint16_t sample, uint16_t channel)
Definition ismrmrd.cpp:378
ISMRMRD::Acquisition::data_end
complex_float_t * data_end()
Definition ismrmrd.cpp:412
ISMRMRD::Acquisition::getTrajPtr
const float * getTrajPtr() const
Definition ismrmrd.cpp:383
ISMRMRD::Acquisition::data_begin
complex_float_t * data_begin()
Definition ismrmrd.cpp:408
ISMRMRD::Acquisition::getDataPtr
const complex_float_t * getDataPtr() const
Definition ismrmrd.cpp:366
ISMRMRD::Acquisition::traj_begin
float * traj_begin()
Definition ismrmrd.cpp:423
ISMRMRD::Acquisition::setData
void setData(complex_float_t *data)
Definition ismrmrd.cpp:374
ISMRMRD::Acquisition::setTraj
void setTraj(float *traj)
Definition ismrmrd.cpp:391
ISMRMRD::FlagBit
Convenience class for flags.
Definition ismrmrd.h:557
ISMRMRD::ImageHeader
Header for MR Image type.
Definition ismrmrd.h:753
ISMRMRD::Image::getNumberOfDataElements
size_t getNumberOfDataElements() const
Definition ismrmrd.cpp:1119
ISMRMRD::Image::begin
T * begin()
Definition ismrmrd.cpp:1132
ISMRMRD::Image::end
T * end()
Definition ismrmrd.cpp:1136
ISMRMRD::Image::getDataSize
size_t getDataSize() const
Definition ismrmrd.cpp:1128
ISMRMRD::NDArray::begin
T * begin()
Definition ismrmrd.cpp:1257
ISMRMRD::NDArray::end
T * end()
Definition ismrmrd.cpp:1261
ISMRMRD::ismrmrd_set_error_handler
EXPORTISMRMRD void ismrmrd_set_error_handler(ismrmrd_error_handler_t)
Definition ismrmrd.c:750
ISMRMRD::ismrmrd_init_acquisition_header
EXPORTISMRMRD int ismrmrd_init_acquisition_header(ISMRMRD_AcquisitionHeader *hdr)
Definition ismrmrd.c:42
ISMRMRD::ismrmrd_strerror
EXPORTISMRMRD const char * ismrmrd_strerror(int code)
Definition ismrmrd.c:754
ISMRMRD::ismrmrd_directions_to_quaternion
EXPORTISMRMRD void ismrmrd_directions_to_quaternion(float const read_dir[3], float const phase_dir[3], float const slice_dir[3], float quat[4])
Definition ismrmrd.c:594
ISMRMRD::ismrmrd_quaternion_to_directions
EXPORTISMRMRD void ismrmrd_quaternion_to_directions(float const quat[4], float read_dir[3], float phase_dir[3], float slice_dir[3])
Definition ismrmrd.c:668
ISMRMRD::ismrmrd_push_error
int ismrmrd_push_error(const char *file, const int line, const char *func, const int code, const char *msg)
Definition ismrmrd.c:689
ISMRMRD::ismrmrd_sign_of_directions
EXPORTISMRMRD int ismrmrd_sign_of_directions(float const read_dir[3], float const phase_dir[3], float const slice_dir[3])
Definition ismrmrd.c:578
ISMRMRD::ISMRMRD_Image
struct ISMRMRD::ISMRMRD_Image ISMRMRD_Image
ISMRMRD::get_data_type
EXPORTISMRMRD ISMRMRD_DataTypes get_data_type()
Allowed data types for Images and NDArrays.
ISMRMRD::ISMRMRD_ImageFlags
ISMRMRD_ImageFlags
Definition ismrmrd.h:199
ISMRMRD::EncodingCounters
ISMRMRD_EncodingCounters EncodingCounters
Some typedefs to beautify the namespace.
Definition ismrmrd.h:542
ISMRMRD::ISMRMRD_ErrorCodes
ISMRMRD_ErrorCodes
Definition ismrmrd.h:106
ISMRMRD::build_exception_string
std::string build_exception_string(void)
ISMRMRD C++ Interface.
Definition ismrmrd.cpp:1341
ISMRMRD::ISMRMRD_AcquisitionFlags
ISMRMRD_AcquisitionFlags
Definition ismrmrd.h:137
ISMRMRD::ISMRMRD_Constants
ISMRMRD_Constants
Definition ismrmrd.h:92
ISMRMRD::ISMRMRD_DataTypes
ISMRMRD_DataTypes
Definition ismrmrd.h:120
ISMRMRD::ISMRMRD_INT
@ ISMRMRD_INT
Definition ismrmrd.h:124
ISMRMRD::ISMRMRD_DOUBLE
@ ISMRMRD_DOUBLE
Definition ismrmrd.h:126
ISMRMRD::ISMRMRD_CXDOUBLE
@ ISMRMRD_CXDOUBLE
Definition ismrmrd.h:128
ISMRMRD::ISMRMRD_UINT
@ ISMRMRD_UINT
Definition ismrmrd.h:123
ISMRMRD::ISMRMRD_CXFLOAT
@ ISMRMRD_CXFLOAT
Definition ismrmrd.h:127
ISMRMRD::ISMRMRD_FLOAT
@ ISMRMRD_FLOAT
Definition ismrmrd.h:125
ISMRMRD::ISMRMRD_USHORT
@ ISMRMRD_USHORT
Definition ismrmrd.h:121
ISMRMRD::ISMRMRD_SHORT
@ ISMRMRD_SHORT
Definition ismrmrd.h:122
ISMRMRD::ISMRMRD_ImageTypes
ISMRMRD_ImageTypes
Definition ismrmrd.h:188
ISMRMRD::ISMRMRD_AcquisitionHeader
Definition ismrmrd.h:259
ISMRMRD::ISMRMRD_AcquisitionHeader::physiology_time_stamp
uint32_t physiology_time_stamp[ISMRMRD_PHYS_STAMPS]
Definition ismrmrd.h:265
ISMRMRD::ISMRMRD_AcquisitionHeader::phase_dir
float phase_dir[3]
Definition ismrmrd.h:278
ISMRMRD::ISMRMRD_AcquisitionHeader::measurement_uid
uint32_t measurement_uid
Definition ismrmrd.h:262
ISMRMRD::ISMRMRD_AcquisitionHeader::idx
ISMRMRD_EncodingCounters idx
Definition ismrmrd.h:281
ISMRMRD::ISMRMRD_AcquisitionHeader::acquisition_time_stamp
uint32_t acquisition_time_stamp
Definition ismrmrd.h:264
ISMRMRD::ISMRMRD_AcquisitionHeader::flags
uint64_t flags
Definition ismrmrd.h:261
ISMRMRD::ISMRMRD_AcquisitionHeader::user_int
int32_t user_int[ISMRMRD_USER_INTS]
Definition ismrmrd.h:282
ISMRMRD::ISMRMRD_AcquisitionHeader::encoding_space_ref
uint16_t encoding_space_ref
Definition ismrmrd.h:273
ISMRMRD::ISMRMRD_AcquisitionHeader::trajectory_dimensions
uint16_t trajectory_dimensions
Definition ismrmrd.h:274
ISMRMRD::ISMRMRD_AcquisitionHeader::available_channels
uint16_t available_channels
Definition ismrmrd.h:267
ISMRMRD::ISMRMRD_AcquisitionHeader::slice_dir
float slice_dir[3]
Definition ismrmrd.h:279
ISMRMRD::ISMRMRD_AcquisitionHeader::position
float position[3]
Definition ismrmrd.h:276
ISMRMRD::ISMRMRD_AcquisitionHeader::user_float
float user_float[ISMRMRD_USER_FLOATS]
Definition ismrmrd.h:283
ISMRMRD::ISMRMRD_AcquisitionHeader::discard_post
uint16_t discard_post
Definition ismrmrd.h:271
ISMRMRD::ISMRMRD_AcquisitionHeader::center_sample
uint16_t center_sample
Definition ismrmrd.h:272
ISMRMRD::ISMRMRD_AcquisitionHeader::patient_table_position
float patient_table_position[3]
Definition ismrmrd.h:280
ISMRMRD::ISMRMRD_AcquisitionHeader::channel_mask
uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS]
Definition ismrmrd.h:269
ISMRMRD::ISMRMRD_AcquisitionHeader::read_dir
float read_dir[3]
Definition ismrmrd.h:277
ISMRMRD::ISMRMRD_AcquisitionHeader::scan_counter
uint32_t scan_counter
Definition ismrmrd.h:263
ISMRMRD::ISMRMRD_AcquisitionHeader::number_of_samples
uint16_t number_of_samples
Definition ismrmrd.h:266
ISMRMRD::ISMRMRD_AcquisitionHeader::sample_time_us
float sample_time_us
Definition ismrmrd.h:275
ISMRMRD::ISMRMRD_AcquisitionHeader::version
uint16_t version
Definition ismrmrd.h:260
ISMRMRD::ISMRMRD_AcquisitionHeader::discard_pre
uint16_t discard_pre
Definition ismrmrd.h:270
ISMRMRD::ISMRMRD_AcquisitionHeader::active_channels
uint16_t active_channels
Definition ismrmrd.h:268
ISMRMRD::ISMRMRD_Acquisition
Definition ismrmrd.h:325
ISMRMRD::ISMRMRD_Acquisition::head
ISMRMRD_AcquisitionHeader head
Definition ismrmrd.h:326
ISMRMRD::ISMRMRD_EncodingCounters
Definition ismrmrd.h:226
ISMRMRD::ISMRMRD_EncodingCounters::average
uint16_t average
Definition ismrmrd.h:229
ISMRMRD::ISMRMRD_EncodingCounters::repetition
uint16_t repetition
Definition ismrmrd.h:233
ISMRMRD::ISMRMRD_EncodingCounters::segment
uint16_t segment
Definition ismrmrd.h:235
ISMRMRD::ISMRMRD_EncodingCounters::kspace_encode_step_1
uint16_t kspace_encode_step_1
Definition ismrmrd.h:227
ISMRMRD::ISMRMRD_EncodingCounters::kspace_encode_step_2
uint16_t kspace_encode_step_2
Definition ismrmrd.h:228
ISMRMRD::ISMRMRD_EncodingCounters::phase
uint16_t phase
Definition ismrmrd.h:232
ISMRMRD::ISMRMRD_EncodingCounters::user
uint16_t user[ISMRMRD_USER_INTS]
Definition ismrmrd.h:236
ISMRMRD::ISMRMRD_EncodingCounters::set
uint16_t set
Definition ismrmrd.h:234
ISMRMRD::ISMRMRD_EncodingCounters::contrast
uint16_t contrast
Definition ismrmrd.h:231
ISMRMRD::ISMRMRD_EncodingCounters::slice
uint16_t slice
Definition ismrmrd.h:230
ISMRMRD::ISMRMRD_ImageHeader
Definition ismrmrd.h:351
ISMRMRD::ISMRMRD_ImageHeader::data_type
uint16_t data_type
Definition ismrmrd.h:353
ISMRMRD::ISMRMRD_ImageHeader::set
uint16_t set
Definition ismrmrd.h:369
ISMRMRD::ISMRMRD_ImageHeader::user_int
int32_t user_int[ISMRMRD_USER_INTS]
Definition ismrmrd.h:375
ISMRMRD::ISMRMRD_ImageHeader::phase
uint16_t phase
Definition ismrmrd.h:367
ISMRMRD::ISMRMRD_ImageHeader::slice
uint16_t slice
Definition ismrmrd.h:365
ISMRMRD::ISMRMRD_ImageHeader::physiology_time_stamp
uint32_t physiology_time_stamp[ISMRMRD_PHYS_STAMPS]
Definition ismrmrd.h:371
ISMRMRD::ISMRMRD_ImageHeader::image_type
uint16_t image_type
Definition ismrmrd.h:372
ISMRMRD::ISMRMRD_ImageHeader::version
uint16_t version
Definition ismrmrd.h:352
ISMRMRD::ISMRMRD_ImageHeader::matrix_size
uint16_t matrix_size[3]
Definition ismrmrd.h:356
ISMRMRD::ISMRMRD_ImageHeader::image_index
uint16_t image_index
Definition ismrmrd.h:373
ISMRMRD::ISMRMRD_ImageHeader::patient_table_position
float patient_table_position[3]
Definition ismrmrd.h:363
ISMRMRD::ISMRMRD_ImageHeader::channels
uint16_t channels
Definition ismrmrd.h:358
ISMRMRD::ISMRMRD_ImageHeader::phase_dir
float phase_dir[3]
Definition ismrmrd.h:361
ISMRMRD::ISMRMRD_ImageHeader::repetition
uint16_t repetition
Definition ismrmrd.h:368
ISMRMRD::ISMRMRD_ImageHeader::position
float position[3]
Definition ismrmrd.h:359
ISMRMRD::ISMRMRD_ImageHeader::read_dir
float read_dir[3]
Definition ismrmrd.h:360
ISMRMRD::ISMRMRD_ImageHeader::acquisition_time_stamp
uint32_t acquisition_time_stamp
Definition ismrmrd.h:370
ISMRMRD::ISMRMRD_ImageHeader::field_of_view
float field_of_view[3]
Definition ismrmrd.h:357
ISMRMRD::ISMRMRD_ImageHeader::user_float
float user_float[ISMRMRD_USER_FLOATS]
Definition ismrmrd.h:376
ISMRMRD::ISMRMRD_ImageHeader::flags
uint64_t flags
Definition ismrmrd.h:354
ISMRMRD::ISMRMRD_ImageHeader::image_series_index
uint16_t image_series_index
Definition ismrmrd.h:374
ISMRMRD::ISMRMRD_ImageHeader::attribute_string_len
uint32_t attribute_string_len
Definition ismrmrd.h:377
ISMRMRD::ISMRMRD_ImageHeader::slice_dir
float slice_dir[3]
Definition ismrmrd.h:362
ISMRMRD::ISMRMRD_ImageHeader::contrast
uint16_t contrast
Definition ismrmrd.h:366
ISMRMRD::ISMRMRD_ImageHeader::measurement_uid
uint32_t measurement_uid
Definition ismrmrd.h:355
ISMRMRD::ISMRMRD_ImageHeader::average
uint16_t average
Definition ismrmrd.h:364
ISMRMRD::ISMRMRD_Image
Definition ismrmrd.h:420
ISMRMRD::ISMRMRD_NDArray
Definition ismrmrd.h:447
ISMRMRD::ISMRMRD_NDArray::dims
size_t dims[ISMRMRD_NDARRAY_MAXDIM]
Definition ismrmrd.h:451
ISMRMRD::ISMRMRD_NDArray::version
uint16_t version
Definition ismrmrd.h:448
ISMRMRD::ISMRMRD_NDArray::data
void * data
Definition ismrmrd.h:452
ISMRMRD::ISMRMRD_NDArray::ndim
uint16_t ndim
Definition ismrmrd.h:450
ISMRMRD::ISMRMRD_NDArray::data_type
uint16_t data_type
Definition ismrmrd.h:449