ISMRMRD
ISMRM Raw Data Format
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
ismrmrd.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <complex>
#include <vector>
#include "ismrmrd/export.h"
Include dependency graph for ismrmrd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ISMRMRD::ISMRMRD_EncodingCounters
 
struct  ISMRMRD::ISMRMRD_AcquisitionHeader
 
struct  ISMRMRD::ISMRMRD_Acquisition
 
struct  ISMRMRD::ISMRMRD_ImageHeader
 
struct  ISMRMRD::ISMRMRD_Image
 
struct  ISMRMRD::ISMRMRD_NDArray
 
class  ISMRMRD::FlagBit
 Convenience class for flags. More...
 
class  ISMRMRD::AcquisitionHeader
 Header for MR Acquisition type. More...
 
class  ISMRMRD::Acquisition
 MR Acquisition type. More...
 
class  ISMRMRD::ImageHeader
 Header for MR Image type. More...
 
class  ISMRMRD::Image< T >
 MR Image type. More...
 
class  ISMRMRD::NDArray< T >
 N-Dimensional array type. More...
 

Macros

#define ISMRMRD_H
 
#define ISMRMRD_UNALIGNED
 
#define ISMRMRD_PUSH_ERR(code, msg)
 

Typedefs

typedef std::complex< float > complex_float_t
 
typedef std::complex< double > complex_double_t
 
typedef struct ISMRMRD::ISMRMRD_EncodingCounters ISMRMRD::ISMRMRD_EncodingCounters
 
typedef struct ISMRMRD::ISMRMRD_AcquisitionHeader ISMRMRD::ISMRMRD_AcquisitionHeader
 
typedef struct ISMRMRD::ISMRMRD_Acquisition ISMRMRD::ISMRMRD_Acquisition
 
typedef struct ISMRMRD::ISMRMRD_ImageHeader ISMRMRD::ISMRMRD_ImageHeader
 
typedef struct ISMRMRD::ISMRMRD_Image ISMRMRD::ISMRMRD_Image
 
typedef struct ISMRMRD::ISMRMRD_NDArray ISMRMRD::ISMRMRD_NDArray
 
typedef void(* ISMRMRD::ismrmrd_error_handler_t) (const char *file, int line, const char *function, int code, const char *msg)
 
typedef ISMRMRD_EncodingCounters ISMRMRD::EncodingCounters
 Some typedefs to beautify the namespace.
 

Enumerations

enum  ISMRMRD::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::ISMRMRD_ErrorCodes {
  ISMRMRD_BEGINERROR =-1 , ISMRMRD_NOERROR , ISMRMRD_MEMORYERROR , ISMRMRD_FILEERROR ,
  ISMRMRD_TYPEERROR , ISMRMRD_RUNTIMEERROR , ISMRMRD_HDF5ERROR , ISMRMRD_ENDERROR
}
 
enum  ISMRMRD::ISMRMRD_DataTypes {
  ISMRMRD::ISMRMRD_USHORT = 1 , ISMRMRD::ISMRMRD_SHORT = 2 , ISMRMRD::ISMRMRD_UINT = 3 , ISMRMRD::ISMRMRD_INT = 4 ,
  ISMRMRD::ISMRMRD_FLOAT = 5 , ISMRMRD::ISMRMRD_DOUBLE = 6 , ISMRMRD::ISMRMRD_CXFLOAT = 7 , ISMRMRD::ISMRMRD_CXDOUBLE = 8
}
 
enum  ISMRMRD::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::ISMRMRD_ImageTypes {
  ISMRMRD_IMTYPE_MAGNITUDE = 1 , ISMRMRD_IMTYPE_PHASE = 2 , ISMRMRD_IMTYPE_REAL = 3 , ISMRMRD_IMTYPE_IMAG = 4 ,
  ISMRMRD_IMTYPE_COMPLEX = 5
}
 
enum  ISMRMRD::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
}
 

Functions

EXPORTISMRMRD size_t ISMRMRD::ismrmrd_sizeof_data_type (int data_type)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_init_acquisition_header (ISMRMRD_AcquisitionHeader *hdr)
 
EXPORTISMRMRD ISMRMRD_AcquisitionISMRMRD::ismrmrd_create_acquisition ()
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_free_acquisition (ISMRMRD_Acquisition *acq)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_init_acquisition (ISMRMRD_Acquisition *acq)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_cleanup_acquisition (ISMRMRD_Acquisition *acq)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_copy_acquisition (ISMRMRD_Acquisition *acqdest, const ISMRMRD_Acquisition *acqsource)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_make_consistent_acquisition (ISMRMRD_Acquisition *acq)
 
EXPORTISMRMRD size_t ISMRMRD::ismrmrd_size_of_acquisition_traj (const ISMRMRD_Acquisition *acq)
 
EXPORTISMRMRD size_t ISMRMRD::ismrmrd_size_of_acquisition_data (const ISMRMRD_Acquisition *acq)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_init_image_header (ISMRMRD_ImageHeader *hdr)
 
EXPORTISMRMRD ISMRMRD_ImageISMRMRD::ismrmrd_create_image ()
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_free_image (ISMRMRD_Image *im)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_init_image (ISMRMRD_Image *im)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_cleanup_image (ISMRMRD_Image *im)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_copy_image (ISMRMRD_Image *imdest, const ISMRMRD_Image *imsource)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_make_consistent_image (ISMRMRD_Image *im)
 
EXPORTISMRMRD size_t ISMRMRD::ismrmrd_size_of_image_attribute_string (const ISMRMRD_Image *im)
 
EXPORTISMRMRD size_t ISMRMRD::ismrmrd_size_of_image_data (const ISMRMRD_Image *im)
 
EXPORTISMRMRD ISMRMRD_NDArrayISMRMRD::ismrmrd_create_ndarray ()
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_free_ndarray (ISMRMRD_NDArray *arr)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_init_ndarray (ISMRMRD_NDArray *arr)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_cleanup_ndarray (ISMRMRD_NDArray *arr)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_copy_ndarray (ISMRMRD_NDArray *arrdest, const ISMRMRD_NDArray *arrsource)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_make_consistent_ndarray (ISMRMRD_NDArray *arr)
 
EXPORTISMRMRD size_t ISMRMRD::ismrmrd_size_of_ndarray_data (const ISMRMRD_NDArray *arr)
 
EXPORTISMRMRD bool ISMRMRD::ismrmrd_is_flag_set (const uint64_t flags, const uint64_t val)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_set_flag (ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_set_flags (ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_clear_flag (ISMRMRD_UNALIGNED uint64_t *flags, const uint64_t val)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_clear_all_flags (ISMRMRD_UNALIGNED uint64_t *flags)
 
EXPORTISMRMRD bool ISMRMRD::ismrmrd_is_channel_on (const uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_set_channel_on (uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_set_channel_off (uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS], const uint16_t chan)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_set_all_channels_off (uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS])
 
int ISMRMRD::ismrmrd_push_error (const char *file, const int line, const char *func, const int code, const char *msg)
 
EXPORTISMRMRD void ISMRMRD::ismrmrd_set_error_handler (ismrmrd_error_handler_t)
 
EXPORTISMRMRD const char * ISMRMRD::ismrmrd_strerror (int code)
 
bool ISMRMRD::ismrmrd_pop_error (char **file, int *line, char **func, int *code, char **msg)
 
EXPORTISMRMRD int ISMRMRD::ismrmrd_sign_of_directions (float const read_dir[3], float const phase_dir[3], float const slice_dir[3])
 
EXPORTISMRMRD void ISMRMRD::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::ismrmrd_quaternion_to_directions (float const quat[4], float read_dir[3], float phase_dir[3], float slice_dir[3])
 
std::string ISMRMRD::build_exception_string (void)
 ISMRMRD C++ Interface.
 
bool ISMRMRD::operator== (const EncodingCounters &ec1, const EncodingCounters &ec2)
 
template<typename T >
EXPORTISMRMRD ISMRMRD_DataTypes ISMRMRD::get_data_type ()
 Allowed data types for Images and NDArrays.
 

Typedef Documentation

◆ ISMRMRD_Acquisition

Individual MR acquisition.

◆ ISMRMRD_AcquisitionHeader

Header for each MR acquisition.

◆ ISMRMRD_EncodingCounters

Struct used for keeping track of typical loop counters in MR experiment.

◆ ISMRMRD_ImageHeader

Header for each Image

◆ ISMRMRD_NDArray

A simple N dimensional array

Enumeration Type Documentation

◆ ISMRMRD_AcquisitionFlags

Acquisition Flags

◆ ISMRMRD_Constants

Constants

◆ ISMRMRD_DataTypes

Data Types

Enumerator
ISMRMRD_USHORT 

corresponds to uint16_t

ISMRMRD_SHORT 

corresponds to int16_t

ISMRMRD_UINT 

corresponds to uint32_t

ISMRMRD_INT 

corresponds to int32_t

ISMRMRD_FLOAT 

corresponds to float

ISMRMRD_DOUBLE 

corresponds to double

ISMRMRD_CXFLOAT 

corresponds to complex float

ISMRMRD_CXDOUBLE 

corresponds to complex double

◆ ISMRMRD_ErrorCodes

Constants

◆ ISMRMRD_ImageFlags

Image Flags

◆ ISMRMRD_ImageTypes

Image Types

Function Documentation

◆ build_exception_string()

std::string ISMRMRD::build_exception_string ( void  )

ISMRMRD C++ Interface.

Construct exception message from ISMRMRD error stack

◆ ismrmrd_pop_error()

bool ISMRMRD::ismrmrd_pop_error ( char **  file,
int *  line,
char **  func,
int *  code,
char **  msg 
)

Populates parameters (if non-NULL) with error information

Returns
true if there was error information to return, false otherwise

◆ ismrmrd_sizeof_data_type()

size_t ISMRMRD::ismrmrd_sizeof_data_type ( int  data_type)

Returns the size in bytes of an ISMRMRD_DataType