Loading...
Searching...
No Matches
ismrmrd.h
Go to the documentation of this file.
/* ISMRMRD MR Raw Data Strutures */
/* DRAFT */
/* Authors: */
/* Michael S. Hansen (michael.hansen@nih.gov) */
/* Brian Hargreaves (bah@stanford.edu) */
/* Sebastian Kozerke (kozerke@biomed.ee.ethz.ch) */
/* Kaveh Vahedipour (k.vahedipour@fz-juelich.de) */
/* Hui Xue (hui.xue@nih.gov) */
/* Souheil Inati (souheil.inati@nih.gov) */
/* Joseph Naegele (joseph.naegele@nih.gov) */
// clang-format off
#pragma once
#ifndef ISMRMRD_H
#define ISMRMRD_H
/* Language and cross platform section for defining types */
/* integers */
#include <stdint.h>
#include <stddef.h> /* for size_t */
#if __cplusplus > 199711L
#include <type_traits>
#endif
/* Unaligned */
#if defined(_MSC_VER) && __cplusplus > 199711L
#define ISMRMRD_UNALIGNED __unaligned
#else
#define ISMRMRD_UNALIGNED
#endif
/* Complex numbers */
#ifdef __cplusplus
#include <complex>
typedef std::complex<float> complex_float_t;
typedef std::complex<double> complex_double_t;
#else
#ifdef _MSC_VER /* MS C compiler */
typedef struct complex_float_t{
float real;
float imag;
}complex_float_t;
typedef struct complex_double_t{
double real;
double imag;
}complex_double_t;
#else /* C99 compiler */
#include <complex.h>
typedef float complex complex_float_t;
typedef double complex complex_double_t;
#endif /* _MSC_VER */
#endif /* __cplusplus */
/* Booleans - part of C++ */
#ifndef __cplusplus
#if defined (_MSC_VER) && (_MSC_VER < 1800) /* old MS C compiler */
typedef int bool;
#define false 0
#define true 1
#else /* C99 compiler */
#include <stdbool.h>
#endif /* _MSC_VER */
#endif /* __cplusplus */
/* Vectors */
#ifdef __cplusplus
#include "cpp98.h"
#include <vector>
#endif /* __cplusplus */
/* Exports needed for MS C++ */
#include "ismrmrd/export.h"
#pragma pack(push, 2) /* Use 2 byte alignment */
#ifdef __cplusplus
namespace ISMRMRD {
extern "C" {
#endif
enum ISMRMRD_Constants {
ISMRMRD_USER_INTS = 8,
ISMRMRD_USER_FLOATS = 8,
ISMRMRD_PHYS_STAMPS = 3,
ISMRMRD_CHANNEL_MASKS = 16,
ISMRMRD_NDARRAY_MAXDIM = 7,
ISMRMRD_POSITION_LENGTH = 3,
ISMRMRD_DIRECTION_LENGTH = 3
};
enum ISMRMRD_ErrorCodes {
ISMRMRD_BEGINERROR=-1,
ISMRMRD_NOERROR,
ISMRMRD_MEMORYERROR,
ISMRMRD_FILEERROR,
ISMRMRD_TYPEERROR,
ISMRMRD_RUNTIMEERROR,
ISMRMRD_HDF5ERROR,
ISMRMRD_ENDERROR
};
enum ISMRMRD_DataTypes {
ISMRMRD_USHORT = 1,
ISMRMRD_SHORT = 2,
ISMRMRD_UINT = 3,
ISMRMRD_INT = 4,
ISMRMRD_FLOAT = 5,
ISMRMRD_DOUBLE = 6,
ISMRMRD_CXFLOAT = 7,
ISMRMRD_CXDOUBLE = 8
};
EXPORTISMRMRD size_t ismrmrd_sizeof_data_type(int data_type);
enum ISMRMRD_AcquisitionFlags {
ISMRMRD_ACQ_FIRST_IN_ENCODE_STEP1 = 1,
ISMRMRD_ACQ_LAST_IN_ENCODE_STEP1 = 2,
ISMRMRD_ACQ_FIRST_IN_ENCODE_STEP2 = 3,
ISMRMRD_ACQ_LAST_IN_ENCODE_STEP2 = 4,
ISMRMRD_ACQ_FIRST_IN_AVERAGE = 5,
ISMRMRD_ACQ_LAST_IN_AVERAGE = 6,
ISMRMRD_ACQ_FIRST_IN_SLICE = 7,
ISMRMRD_ACQ_LAST_IN_SLICE = 8,
ISMRMRD_ACQ_FIRST_IN_CONTRAST = 9,
ISMRMRD_ACQ_LAST_IN_CONTRAST = 10,
ISMRMRD_ACQ_FIRST_IN_PHASE = 11,
ISMRMRD_ACQ_LAST_IN_PHASE = 12,
ISMRMRD_ACQ_FIRST_IN_REPETITION = 13,
ISMRMRD_ACQ_LAST_IN_REPETITION = 14,
ISMRMRD_ACQ_FIRST_IN_SET = 15,
ISMRMRD_ACQ_LAST_IN_SET = 16,
ISMRMRD_ACQ_FIRST_IN_SEGMENT = 17,
ISMRMRD_ACQ_LAST_IN_SEGMENT = 18,
ISMRMRD_ACQ_IS_NOISE_MEASUREMENT = 19,
ISMRMRD_ACQ_IS_PARALLEL_CALIBRATION = 20,
ISMRMRD_ACQ_IS_PARALLEL_CALIBRATION_AND_IMAGING = 21,
ISMRMRD_ACQ_IS_REVERSE = 22,
ISMRMRD_ACQ_IS_NAVIGATION_DATA = 23,
ISMRMRD_ACQ_IS_PHASECORR_DATA = 24,
ISMRMRD_ACQ_LAST_IN_MEASUREMENT = 25,
ISMRMRD_ACQ_IS_HPFEEDBACK_DATA = 26,
ISMRMRD_ACQ_IS_DUMMYSCAN_DATA = 27,
ISMRMRD_ACQ_IS_RTFEEDBACK_DATA = 28,
ISMRMRD_ACQ_IS_SURFACECOILCORRECTIONSCAN_DATA = 29,
ISMRMRD_ACQ_IS_PHASE_STABILIZATION_REFERENCE = 30,
ISMRMRD_ACQ_IS_PHASE_STABILIZATION = 31,
ISMRMRD_ACQ_COMPRESSION1 = 53,
ISMRMRD_ACQ_COMPRESSION2 = 54,
ISMRMRD_ACQ_COMPRESSION3 = 55,
ISMRMRD_ACQ_COMPRESSION4 = 56,
ISMRMRD_ACQ_USER1 = 57,
ISMRMRD_ACQ_USER2 = 58,
ISMRMRD_ACQ_USER3 = 59,
ISMRMRD_ACQ_USER4 = 60,
ISMRMRD_ACQ_USER5 = 61,
ISMRMRD_ACQ_USER6 = 62,
ISMRMRD_ACQ_USER7 = 63,
ISMRMRD_ACQ_USER8 = 64
};
enum ISMRMRD_ImageTypes {
ISMRMRD_IMTYPE_MAGNITUDE = 1,
ISMRMRD_IMTYPE_PHASE = 2,
ISMRMRD_IMTYPE_REAL = 3,
ISMRMRD_IMTYPE_IMAG = 4,
ISMRMRD_IMTYPE_COMPLEX = 5
};
enum ISMRMRD_ImageFlags {
ISMRMRD_IMAGE_IS_NAVIGATION_DATA = 1,
ISMRMRD_IMAGE_FIRST_IN_AVERAGE = 5,
ISMRMRD_IMAGE_LAST_IN_AVERAGE = 6,
ISMRMRD_IMAGE_FIRST_IN_SLICE = 7,
ISMRMRD_IMAGE_LAST_IN_SLICE = 8,
ISMRMRD_IMAGE_FIRST_IN_CONTRAST = 9,
ISMRMRD_IMAGE_LAST_IN_CONTRAST = 10,
ISMRMRD_IMAGE_FIRST_IN_PHASE = 11,
ISMRMRD_IMAGE_LAST_IN_PHASE = 12,
ISMRMRD_IMAGE_FIRST_IN_REPETITION = 13,
ISMRMRD_IMAGE_LAST_IN_REPETITION = 14,
ISMRMRD_IMAGE_FIRST_IN_SET = 15,
ISMRMRD_IMAGE_LAST_IN_SET = 16,
ISMRMRD_IMAGE_USER1 = 57,
ISMRMRD_IMAGE_USER2 = 58,
ISMRMRD_IMAGE_USER3 = 59,
ISMRMRD_IMAGE_USER4 = 60,
ISMRMRD_IMAGE_USER5 = 61,
ISMRMRD_IMAGE_USER6 = 62,
ISMRMRD_IMAGE_USER7 = 63,
ISMRMRD_IMAGE_USER8 = 64
};
typedef struct ISMRMRD_EncodingCounters {
uint16_t kspace_encode_step_1;
uint16_t kspace_encode_step_2;
uint16_t average;
uint16_t slice;
uint16_t contrast;
uint16_t phase;
uint16_t repetition;
uint16_t set;
uint16_t segment;
uint16_t user[ISMRMRD_USER_INTS];
} ISMRMRD_EncodingCounters;
#if __cplusplus > 199711L // Static assert requires C++11
// Check standard layout
static_assert(std::is_standard_layout<ISMRMRD_EncodingCounters>::value, "ISMRMRD_EncodingCounters is not a standard layout type");
// Check for size and offset of EncodingCounters struct members
static_assert(sizeof(ISMRMRD_EncodingCounters) == 34, "ISMRMRD_EncodingCounters is not the expected size");
static_assert(offsetof(ISMRMRD_EncodingCounters, kspace_encode_step_1) == 0, "kspace_encode_step_1 is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, kspace_encode_step_2) == 2, "kspace_encode_step_2 is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, average) == 4, "average is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, slice) == 6, "slice is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, contrast) == 8, "contrast is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, phase) == 10, "phase is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, repetition) == 12, "repetition is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, set) == 14, "set is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, segment) == 16, "segment is not at the expected offset");
static_assert(offsetof(ISMRMRD_EncodingCounters, user) == 18, "user is not at the expected offset");
#endif
typedef struct ISMRMRD_AcquisitionHeader {
uint16_t version;
uint64_t flags;
uint32_t measurement_uid;
uint32_t scan_counter;
uint32_t acquisition_time_stamp;
uint32_t physiology_time_stamp[ISMRMRD_PHYS_STAMPS];
uint16_t number_of_samples;
uint16_t available_channels;
uint16_t active_channels;
uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS];
uint16_t discard_pre;
uint16_t discard_post;
uint16_t center_sample;
uint16_t encoding_space_ref;
uint16_t trajectory_dimensions;
float sample_time_us;
float position[3];
float read_dir[3];
float phase_dir[3];
float slice_dir[3];
float patient_table_position[3];
ISMRMRD_EncodingCounters idx;
int32_t user_int[ISMRMRD_USER_INTS];
float user_float[ISMRMRD_USER_FLOATS];
} ISMRMRD_AcquisitionHeader;
#if __cplusplus > 199711L // Static assert requires C++11
// Check standard layout
static_assert(std::is_standard_layout<ISMRMRD_AcquisitionHeader>::value, "ISMRMRD_AcquisitionHeader is not a standard layout type");
// Check for size and offset of AcquisitionHeader struct members
static_assert(sizeof(ISMRMRD_AcquisitionHeader) == 340, "ISMRMRD_AcquisitionHeader is not the expected size");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, version) == 0, "version is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, flags) == 2, "flags is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, measurement_uid) == 10, "measurement_uid is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, scan_counter) == 14, "scan_counter is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, acquisition_time_stamp) == 18, "acquisition_time_stamp is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, physiology_time_stamp) == 22, "physiology_time_stamp is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, number_of_samples) == 34, "number_of_samples is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, available_channels) == 36, "available_channels is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, active_channels) == 38, "active_channels is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, channel_mask) == 40, "channel_mask is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, discard_pre) == 168, "discard_pre is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, discard_post) == 170, "discard_post is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, center_sample) == 172, "center_sample is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, encoding_space_ref) == 174, "encoding_space_ref is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, trajectory_dimensions) == 176, "trajectory_dimensions is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, sample_time_us) == 178, "sample_time_us is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, position) == 182, "position is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, read_dir) == 194, "read_dir is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, phase_dir) == 206, "phase_dir is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, slice_dir) == 218, "slice_dir is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, patient_table_position) == 230, "patient_table_position is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, idx) == 242, "idx is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, user_int) == 276, "user_int is not at the expected offset");
static_assert(offsetof(ISMRMRD_AcquisitionHeader, user_float) == 308, "user_float is not at the expected offset");
#endif
EXPORTISMRMRD int ismrmrd_init_acquisition_header(ISMRMRD_AcquisitionHeader *hdr);
typedef struct ISMRMRD_Acquisition {
ISMRMRD_AcquisitionHeader head;
float *traj;
complex_float_t *data;
} ISMRMRD_Acquisition;
EXPORTISMRMRD ISMRMRD_Acquisition * ismrmrd_create_acquisition();
EXPORTISMRMRD int ismrmrd_free_acquisition(ISMRMRD_Acquisition *acq);
EXPORTISMRMRD int ismrmrd_init_acquisition(ISMRMRD_Acquisition *acq);
EXPORTISMRMRD int ismrmrd_cleanup_acquisition(ISMRMRD_Acquisition *acq);
EXPORTISMRMRD int ismrmrd_copy_acquisition(ISMRMRD_Acquisition *acqdest, const ISMRMRD_Acquisition *acqsource);
EXPORTISMRMRD int ismrmrd_make_consistent_acquisition(ISMRMRD_Acquisition *acq);
EXPORTISMRMRD size_t ismrmrd_size_of_acquisition_traj(const ISMRMRD_Acquisition *acq);
EXPORTISMRMRD size_t ismrmrd_size_of_acquisition_data(const ISMRMRD_Acquisition *acq);
/**********/
/* Images */
/**********/
typedef struct ISMRMRD_ImageHeader {
uint16_t version;
uint16_t data_type;
uint64_t flags;
uint32_t measurement_uid;
uint16_t matrix_size[3];
float field_of_view[3];
uint16_t channels;
float position[3];
float read_dir[3];
float phase_dir[3];
float slice_dir[3];
float patient_table_position[3];
uint16_t average;
uint16_t slice;
uint16_t contrast;
uint16_t phase;
uint16_t repetition;
uint16_t set;
uint32_t acquisition_time_stamp;
uint32_t physiology_time_stamp[ISMRMRD_PHYS_STAMPS];
uint16_t image_type;
uint16_t image_index;
uint16_t image_series_index;
int32_t user_int[ISMRMRD_USER_INTS];
float user_float[ISMRMRD_USER_FLOATS];
uint32_t attribute_string_len;
} ISMRMRD_ImageHeader;
#if __cplusplus > 199711L // Static assert requires C++11
// Check standard layout
static_assert(std::is_standard_layout<ISMRMRD_ImageHeader>::value, "ISMRMRD_ImageHeader is not a standard layout type");
// Check size and offsets of ISMRMRD_ImageHeader
static_assert(sizeof(ISMRMRD_ImageHeader) == 198, "ISMRMRD_ImageHeader is not the expected size");
static_assert(offsetof(ISMRMRD_ImageHeader, version) == 0, "version is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, data_type) == 2, "data_type is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, flags) == 4, "flags is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, measurement_uid) == 12, "measurement_uid is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, matrix_size) == 16, "matrix_size is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, field_of_view) == 22, "field_of_view is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, channels) == 34, "channels is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, position) == 36, "position is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, read_dir) == 48, "read_dir is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, phase_dir) == 60, "phase_dir is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, slice_dir) == 72, "slice_dir is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, patient_table_position) == 84, "patient_table_position is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, average) == 96, "average is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, slice) == 98, "slice is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, contrast) == 100, "contrast is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, phase) == 102, "phase is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, repetition) == 104, "repetition is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, set) == 106, "set is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, acquisition_time_stamp) == 108, "acquisition_time_stamp is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, physiology_time_stamp) == 112, "physiology_time_stamp is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, image_type) == 124, "image_type is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, image_index) == 126, "image_index is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, image_series_index) == 128, "image_series_index is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, user_int) == 130, "user_int is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, user_float) == 162, "user_float is not at the expected offset");
static_assert(offsetof(ISMRMRD_ImageHeader, attribute_string_len) == 194, "attribute_string_len is not at the expected offset");
#endif
EXPORTISMRMRD int ismrmrd_init_image_header(ISMRMRD_ImageHeader *hdr);
typedef struct ISMRMRD_Image {
ISMRMRD_ImageHeader head;
char *attribute_string;
void *data;
} ISMRMRD_Image;
EXPORTISMRMRD ISMRMRD_Image * ismrmrd_create_image();
EXPORTISMRMRD int ismrmrd_free_image(ISMRMRD_Image *im);
EXPORTISMRMRD int ismrmrd_init_image(ISMRMRD_Image *im);
EXPORTISMRMRD int ismrmrd_cleanup_image(ISMRMRD_Image *im);
EXPORTISMRMRD int ismrmrd_copy_image(ISMRMRD_Image *imdest, const ISMRMRD_Image *imsource);
EXPORTISMRMRD int ismrmrd_make_consistent_image(ISMRMRD_Image *im);
EXPORTISMRMRD size_t ismrmrd_size_of_image_attribute_string(const ISMRMRD_Image *im);
EXPORTISMRMRD size_t ismrmrd_size_of_image_data(const ISMRMRD_Image *im);
/************/
/* NDArrays */
/************/
typedef struct ISMRMRD_NDArray {
uint16_t version;
uint16_t data_type;
uint16_t ndim;
size_t dims[ISMRMRD_NDARRAY_MAXDIM];
void *data;
} ISMRMRD_NDArray;
EXPORTISMRMRD ISMRMRD_NDArray * ismrmrd_create_ndarray();
EXPORTISMRMRD int ismrmrd_free_ndarray(ISMRMRD_NDArray *arr);
EXPORTISMRMRD int ismrmrd_init_ndarray(ISMRMRD_NDArray *arr);
EXPORTISMRMRD int ismrmrd_cleanup_ndarray(ISMRMRD_NDArray *arr);
EXPORTISMRMRD int ismrmrd_copy_ndarray(ISMRMRD_NDArray *arrdest, const ISMRMRD_NDArray *arrsource);
EXPORTISMRMRD int ismrmrd_make_consistent_ndarray(ISMRMRD_NDArray *arr);
EXPORTISMRMRD size_t ismrmrd_size_of_ndarray_data(const ISMRMRD_NDArray *arr);
/*********/
/* Flags */
/*********/
EXPORTISMRMRD bool ismrmrd_is_flag_set(const uint64_t flags, const uint64_t val);
EXPORTISMRMRD int ismrmrd_set_flag(ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val);
EXPORTISMRMRD int ismrmrd_set_flags(ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val);
EXPORTISMRMRD int ismrmrd_clear_flag(ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val);
EXPORTISMRMRD int ismrmrd_clear_all_flags(ISMRMRD_UNALIGNED uint64_t *flags);
/*****************/
/* Channel Masks */
/*****************/
EXPORTISMRMRD bool ismrmrd_is_channel_on(const uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan);
EXPORTISMRMRD int ismrmrd_set_channel_on(uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan);
EXPORTISMRMRD int ismrmrd_set_channel_off(uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan);
EXPORTISMRMRD int ismrmrd_set_all_channels_off(uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS]);
/******************/
/* Error Handling */
/******************/
typedef void (*ismrmrd_error_handler_t)(const char *file, int line,
const char *function, int code, const char *msg);
#define ISMRMRD_PUSH_ERR(code, msg) ismrmrd_push_error(__FILE__, __LINE__, \
__func__, (code), (msg))
int ismrmrd_push_error(const char *file, const int line, const char *func,
const int code, const char *msg);
EXPORTISMRMRD void ismrmrd_set_error_handler(ismrmrd_error_handler_t);
EXPORTISMRMRD const char *ismrmrd_strerror(int code);
bool ismrmrd_pop_error(char **file, int *line, char **func,
int *code, char **msg);
/*****************************/
/* Rotations and Quaternions */
/*****************************/
EXPORTISMRMRD int ismrmrd_sign_of_directions(float const read_dir[3], float const phase_dir[3], float const slice_dir[3]);
EXPORTISMRMRD void ismrmrd_directions_to_quaternion(float const read_dir[3], float const phase_dir[3], float const slice_dir[3], float quat[4]);
EXPORTISMRMRD void ismrmrd_quaternion_to_directions(float const quat[4], float read_dir[3], float phase_dir[3], float slice_dir[3]);
#pragma pack(pop) /* Restore old alignment */
#ifdef __cplusplus
} // extern "C"
std::string build_exception_string(void);
typedef ISMRMRD_EncodingCounters EncodingCounters;
bool operator==(const EncodingCounters& ec1, const EncodingCounters& ec2);
template <typename T> EXPORTISMRMRD ISMRMRD_DataTypes get_data_type();
class EXPORTISMRMRD FlagBit
{
public:
FlagBit(unsigned short b)
: bitmask_(0)
{
if (b > 0) {
bitmask_ = 1;
bitmask_ = (bitmask_ << (b-1));
}
}
bool isSet(const uint64_t& m) const {
return ((m & bitmask_)>0);
}
uint64_t bitmask_;
};
class EXPORTISMRMRD AcquisitionHeader: public ISMRMRD_AcquisitionHeader {
public:
// Constructors
AcquisitionHeader();
bool operator==(const AcquisitionHeader& acq) const;
// Flag methods
bool isFlagSet(const ISMRMRD_AcquisitionFlags val) const;
void setFlag(const ISMRMRD_AcquisitionFlags val);
void clearFlag(const ISMRMRD_AcquisitionFlags val);
void clearAllFlags();
// Channel mask methods
bool isChannelActive(uint16_t channel_id) const;
void setChannelActive(uint16_t channel_id);
void setChannelNotActive(uint16_t channel_id);
void setAllChannelsNotActive();
};
#if __cplusplus > 199711L // Static assert and is_standard_layout requires C++11
static_assert(sizeof(AcquisitionHeader) == sizeof(ISMRMRD_AcquisitionHeader), "AcquisitionHeader size mismatch");
static_assert(std::is_standard_layout<AcquisitionHeader>::value, "AcquisitionHeader is not a standard layout type");
#endif
class EXPORTISMRMRD Acquisition {
friend class Dataset;
public:
// Constructors, assignment, destructor
Acquisition();
Acquisition(uint16_t num_samples, uint16_t active_channels=1, uint16_t trajectory_dimensions=0);
Acquisition(const Acquisition &other);
Acquisition & operator= (const Acquisition &other);
~Acquisition();
// Accessors and mutators
uint16_t version() const;
uint64_t flags() const;
uint32_t &measurement_uid();
uint32_t &scan_counter();
uint32_t &acquisition_time_stamp();
uint32_t (&physiology_time_stamp())[ISMRMRD_PHYS_STAMPS];
const uint16_t &number_of_samples();
uint16_t &available_channels();
const uint16_t &active_channels();
const uint64_t (&channel_mask())[ISMRMRD_CHANNEL_MASKS];
uint16_t &discard_pre();
uint16_t &discard_post();
uint16_t &center_sample();
uint16_t &encoding_space_ref();
const uint16_t &trajectory_dimensions();
float &sample_time_us();
float (&position())[3];
float (&read_dir())[3];
float (&phase_dir())[3];
float (&slice_dir())[3];
float (&patient_table_position())[3];
ISMRMRD_EncodingCounters &idx();
int32_t (&user_int())[ISMRMRD_USER_INTS];
float (&user_float())[ISMRMRD_USER_FLOATS];
uint32_t measurement_uid() const;
uint32_t scan_counter() const;
uint32_t acquisition_time_stamp() const;
const uint32_t (&physiology_time_stamp() const )[ISMRMRD_PHYS_STAMPS];
uint16_t number_of_samples() const;
uint16_t available_channels() const;
uint16_t active_channels() const;
const uint64_t (&channel_mask() const)[ISMRMRD_CHANNEL_MASKS];
uint16_t discard_pre() const;
uint16_t discard_post() const;
uint16_t center_sample() const;
uint16_t encoding_space_ref() const;
uint16_t trajectory_dimensions() const;
float sample_time_us() const;
const float (&position() const)[3];
const float (&read_dir() const)[3];
const float (&phase_dir() const)[3];
const float (&slice_dir() const)[3];
const float (&patient_table_position() const)[3];
const ISMRMRD_EncodingCounters &idx() const;
const int32_t (&user_int() const)[ISMRMRD_USER_INTS];
const float (&user_float() const)[ISMRMRD_USER_FLOATS];
// Sizes
void resize(uint16_t num_samples, uint16_t active_channels=1, uint16_t trajectory_dimensions=0);
size_t getNumberOfDataElements() const;
size_t getNumberOfTrajElements() const;
size_t getDataSize() const;
size_t getTrajSize() const;
// Header, data and trajectory accessors
const AcquisitionHeader &getHead() const;
void setHead(const AcquisitionHeader &other);
const complex_float_t * getDataPtr() const;
complex_float_t * getDataPtr();
complex_float_t & data(uint16_t sample, uint16_t channel);
void setData(complex_float_t * data);
complex_float_t * data_begin();
const complex_float_t * data_begin() const;
complex_float_t * data_end();
const complex_float_t * data_end() const;
const float * getTrajPtr() const;
float * getTrajPtr();
float & traj(uint16_t dimension, uint16_t sample);
void setTraj(float * traj);
float * traj_begin();
const float * traj_begin() const;
float * traj_end();
const float * traj_end() const;
// Flag methods
bool isFlagSet(const uint64_t val) const;
void setFlag(const uint64_t val);
void clearFlag(const uint64_t val);
void clearAllFlags();
bool isFlagSet(const FlagBit &val) const { return isFlagSet(val.bitmask_); }
void setFlag(const FlagBit &val) { setFlag(val.bitmask_); }
void clearFlag(const FlagBit &val) { clearFlag(val.bitmask_); }
// Channel mask methods
bool isChannelActive(uint16_t channel_id) const;
void setChannelActive(uint16_t channel_id);
void setChannelNotActive(uint16_t channel_id);
void setAllChannelsNotActive();
protected:
ISMRMRD_Acquisition acq;
};
class EXPORTISMRMRD ImageHeader: public ISMRMRD_ImageHeader {
public:
// Constructor
ImageHeader();
// Flag methods
bool isFlagSet(const uint64_t val) const;
void setFlag(const uint64_t val);
void clearFlag(const uint64_t val);
void clearAllFlags();
};
#if __cplusplus > 199711L // Static assert and is_standard_layout requires C++11
static_assert(sizeof(ImageHeader) == sizeof(ISMRMRD_ImageHeader), "ImageHeader size mismatch");
static_assert(std::is_standard_layout<ImageHeader>::value, "ImageHeader is not a standard layout type");
#endif
template <typename T> class EXPORTISMRMRD Image {
friend class Dataset;
public:
// Constructors
Image(uint16_t matrix_size_x = 0, uint16_t matrix_size_y = 1,
uint16_t matrix_size_z = 1, uint16_t channels = 1);
Image(const Image &other);
Image & operator= (const Image &other);
~Image();
// Image dimensions
void resize(uint16_t matrix_size_x, uint16_t matrix_size_y, uint16_t matrix_size_z, uint16_t channels);
uint16_t getMatrixSizeX() const;
void setMatrixSizeX(uint16_t matrix_size_x);
uint16_t getMatrixSizeY() const;
void setMatrixSizeY(uint16_t matrix_size_y);
uint16_t getMatrixSizeZ() const;
void setMatrixSizeZ(uint16_t matrix_size_z);
uint16_t getNumberOfChannels() const;
void setNumberOfChannels(uint16_t channels);
// Field of view
void setFieldOfView(float fov_x, float fov_y, float fov_z);
float getFieldOfViewX() const;
void setFieldOfViewX(float f);
float getFieldOfViewY() const;
void setFieldOfViewY(float f);
float getFieldOfViewZ() const;
void setFieldOfViewZ(float f);
// Positions and orientations
void setPosition(float x, float y, float z);
float getPositionX() const;
void setPositionX(float x);
float getPositionY() const;
void setPositionY(float y);
float getPositionZ() const;
void setPositionZ(float z);
void setReadDirection(float x, float y, float z);
float getReadDirectionX() const;
void setReadDirectionX(float x);
float getReadDirectionY() const;
void setReadDirectionY(float y);
float getReadDirectionZ() const;
void setReadDirectionZ(float z);
void setPhaseDirection(float x, float y, float z);
float getPhaseDirectionX() const;
void setPhaseDirectionX(float x);
float getPhaseDirectionY() const;
void setPhaseDirectionY(float y);
float getPhaseDirectionZ() const;
void setPhaseDirectionZ(float z);
void setSliceDirection(float x, float y, float z);
float getSliceDirectionX() const;
void setSliceDirectionX(float x);
float getSliceDirectionY() const;
void setSliceDirectionY(float y);
float getSliceDirectionZ() const;
void setSliceDirectionZ(float z);
void setPatientTablePosition(float x, float y, float z);
float getPatientTablePositionX() const;
void setPatientTablePositionX(float x);
float getPatientTablePositionY() const;
void setPatientTablePositionY(float y);
float getPatientTablePositionZ() const;
void setPatientTablePositionZ(float z);
// Attributes
uint16_t getVersion() const;
ISMRMRD_DataTypes getDataType() const;
// Counters and labels
uint32_t getMeasurementUid() const;
void setMeasurementUid(uint32_t measurement_uid);
uint16_t getAverage() const;
void setAverage(uint16_t average);
uint16_t getSlice() const;
void setSlice(uint16_t slice);
uint16_t getContrast() const;
void setContrast(uint16_t contrast);
uint16_t getPhase() const;
void setPhase(uint16_t phase);
uint16_t getRepetition() const;
void setRepetition(uint16_t repetition);
uint16_t getSet() const;
void setSet(uint16_t set);
uint32_t getAcquisitionTimeStamp() const;
void setAcquisitionTimeStamp(uint32_t acquisition_time_stamp);
uint32_t getPhysiologyTimeStamp(unsigned int stamp_id) const;
void setPhysiologyTimeStamp(unsigned int stamp_id, uint32_t value);
uint16_t getImageType() const;
void setImageType(uint16_t image_type);
uint16_t getImageIndex() const;
void setImageIndex(uint16_t image_index);
uint16_t getImageSeriesIndex() const;
void setImageSeriesIndex(uint16_t image_series_index);
// User parameters
float getUserFloat(unsigned int index) const;
void setUserFloat(unsigned int index, float value);
int32_t getUserInt(unsigned int index) const;
void setUserInt(unsigned int index, int32_t value);
// Flags
uint64_t getFlags() const;
void setFlags(const uint64_t flags);
bool isFlagSet(const uint64_t val) const;
void setFlag(const uint64_t val);
void clearFlag(const uint64_t val);
void clearAllFlags();
// Header
ImageHeader & getHead();
const ImageHeader & getHead() const;
void setHead(const ImageHeader& head);
// Attribute string
void getAttributeString(std::string &attr) const;
const char *getAttributeString() const;
void setAttributeString(const std::string &attr);
void setAttributeString(const char *attr);
size_t getAttributeStringLength() const;
// Data
T * getDataPtr();
const T * getDataPtr() const;
size_t getNumberOfDataElements() const;
size_t getDataSize() const;
T* begin();
T* end();
T & operator () (uint16_t x, uint16_t y=0, uint16_t z=0 , uint16_t channel =0);
protected:
ISMRMRD_Image im;
};
template <typename T> class EXPORTISMRMRD NDArray {
friend class Dataset;
public:
// Constructors, destructor and copy
NDArray();
NDArray(const std::vector<size_t> dimvec);
NDArray(const NDArray<T> &other);
~NDArray();
NDArray<T> & operator= (const NDArray<T> &other);
// Accessors and mutators
ISMRMRD_DataTypes getDataType() const;
uint16_t getVersion() const;
uint16_t getNDim() const;
const size_t (&getDims() const)[ISMRMRD_NDARRAY_MAXDIM];
size_t getDataSize() const;
void resize(const std::vector<size_t> dimvec);
size_t getNumberOfElements() const;
T * getDataPtr();
const T * getDataPtr() const;
T * begin();
T* end();
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);
protected:
ISMRMRD_NDArray arr;
};
} // namespace ISMRMRD
#endif
#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