Loading...
Searching...
No Matches
dataset.h File Reference
`#include "ismrmrd/ismrmrd.h"`
`#include "ismrmrd/waveform.h"`
`#include <hdf5.h>`
`#include <string>`

Go to the source code of this file.

## Classes

struct | ISMRMRD::ISMRMRD_Dataset
class | ISMRMRD::Dataset

## Typedefs

typedef struct ISMRMRD::ISMRMRD_Dataset | ISMRMRD::ISMRMRD_Dataset

## Functions

EXPORTISMRMRD int | ISMRMRD::ismrmrd_init_dataset (ISMRMRD_Dataset *dset, const char *filename, const char *groupname)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_open_dataset (ISMRMRD_Dataset *dset, const bool create_if_needed)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_close_dataset (ISMRMRD_Dataset *dset)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_write_header (const ISMRMRD_Dataset *dset, const char *xmlstring)
EXPORTISMRMRD char * | ISMRMRD::ismrmrd_read_header (const ISMRMRD_Dataset *dset)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_append_acquisition (const ISMRMRD_Dataset *dset, const ISMRMRD_Acquisition *acq)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_read_acquisition (const ISMRMRD_Dataset *dset, uint32_t index, ISMRMRD_Acquisition *acq)
EXPORTISMRMRD uint32_t | ISMRMRD::ismrmrd_get_number_of_acquisitions (const ISMRMRD_Dataset *dset)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_append_waveform (const ISMRMRD_Dataset *dset, const ISMRMRD_Waveform *wav)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_read_waveform (const ISMRMRD_Dataset *dset, uint32_t index, ISMRMRD_Waveform *wav)
EXPORTISMRMRD uint32_t | ISMRMRD::ismrmrd_get_number_of_waveforms (const ISMRMRD_Dataset *dset)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_append_image (const ISMRMRD_Dataset *dset, const char *varname, const ISMRMRD_Image *im)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_read_image (const ISMRMRD_Dataset *dset, const char *varname, const uint32_t index, ISMRMRD_Image *im)
EXPORTISMRMRD uint32_t | ISMRMRD::ismrmrd_get_number_of_images (const ISMRMRD_Dataset *dset, const char *varname)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_append_array (const ISMRMRD_Dataset *dset, const char *varname, const ISMRMRD_NDArray *arr)
EXPORTISMRMRD int | ISMRMRD::ismrmrd_read_array (const ISMRMRD_Dataset *dataset, const char *varname, const uint32_t index, ISMRMRD_NDArray *arr)
EXPORTISMRMRD uint32_t | ISMRMRD::ismrmrd_get_number_of_arrays (const ISMRMRD_Dataset *dset, const char *varname)

## Typedef Documentation

## ISMRMRD_Dataset

typedef struct ISMRMRD::ISMRMRD_Dataset ISMRMRD::ISMRMRD_Dataset

Interface for accessing an ISMRMRD Data Set stored on disk in HDF5 format.

A given ISMRMRD dataset if assumed to be stored under one group name in the HDF5 file. To make the datasets consistent, this library enforces that the XML configuration is stored in the variable groupname/xml and the Acquisitions are stored in the variable groupname/data.

## Function Documentation

## ismrmrd_append_acquisition()

int ISMRMRD::ismrmrd_append_acquisition | ( | const ISMRMRD_Dataset * | dset,
|  | const ISMRMRD_Acquisition * | acq )

Appends and NMR/MRI acquisition to the dataset.

Please consult @See ISMRMRD_Acquisition struct for details.

## ismrmrd_append_array()

int ISMRMRD::ismrmrd_append_array | ( | const ISMRMRD_Dataset * | dset,
|  | const char * | varname,
|  | const ISMRMRD_NDArray * | arr )

Appends an NDArray to the variable named varname in the dataset.

Please consult @See NDArray struct for details.

Arrays contain simple data elements such as float, double, etc.

Arrays of the same size can be appended to "grow" an array, e.g. 3D arrays of size (K,L,M) can be appended to grow a 4D array of size (K,L,M,N).

## ismrmrd_append_image()

int ISMRMRD::ismrmrd_append_image | ( | const ISMRMRD_Dataset * | dset,
|  | const char * | varname,
|  | const ISMRMRD_Image * | im )

Appends an Image to the variable named varname in the dataset.

Please consult @See ISMRMRD_Image struct for details.

Headers and attribute strings are stored separately from the data. This allows for easy viewing and reading in other applications.

Images of the same size can be appended to "grow" an array. e.g. 20 images of size (256, 256, 4, 16), i.e. 4 slice and 16 channels, can be appended one at a time to make a (256, 256, 4, 16, 20) array in the file.

## ismrmrd_append_waveform()

int ISMRMRD::ismrmrd_append_waveform | ( | const ISMRMRD_Dataset * | dset,
|  | const ISMRMRD_Waveform * | wav )

Appends and waveform data to the dataset.

Please consult @See ISMRMRD_Waveform struct for details.

## ismrmrd_close_dataset()

int ISMRMRD::ismrmrd_close_dataset | ( | ISMRMRD_Dataset * | dset | ) |

Closes all references to the underlying HDF5 file.

## ismrmrd_get_number_of_acquisitions()

uint32_t ISMRMRD::ismrmrd_get_number_of_acquisitions | ( | const ISMRMRD_Dataset * | dset | ) |

Return the number of acquisitions in the dataset.

## ismrmrd_get_number_of_arrays()

uint32_t ISMRMRD::ismrmrd_get_number_of_arrays | ( | const ISMRMRD_Dataset * | dset,
|  | const char * | varname )

Return the number of arrays in the variable varname in the dataset.

## ismrmrd_get_number_of_images()

uint32_t ISMRMRD::ismrmrd_get_number_of_images | ( | const ISMRMRD_Dataset * | dset,
|  | const char * | varname )

Return the number of images in the variable varname in the dataset.

## ismrmrd_get_number_of_waveforms()

uint32_t ISMRMRD::ismrmrd_get_number_of_waveforms | ( | const ISMRMRD_Dataset * | dset | ) |

Return the number of waveforms in the dataset.

## ismrmrd_init_dataset()

int ISMRMRD::ismrmrd_init_dataset | ( | ISMRMRD_Dataset * | dset,
|  | const char * | filename,
|  | const char * | groupname )

Initializes an ISMRMRD dataset structure

## ismrmrd_open_dataset()

int ISMRMRD::ismrmrd_open_dataset | ( | ISMRMRD_Dataset * | dset,
|  | const bool | create_if_needed )

Opens an ISMRMRD dataset.

## ismrmrd_read_acquisition()

int ISMRMRD::ismrmrd_read_acquisition | ( | const ISMRMRD_Dataset * | dset,
|  | uint32_t | index,
|  | ISMRMRD_Acquisition * | acq )

Reads the acquisition with the specified index from the dataset.

## ismrmrd_read_array()

int ISMRMRD::ismrmrd_read_array | ( | const ISMRMRD_Dataset * | dataset,
|  | const char * | varname,
|  | const uint32_t | index,
|  | ISMRMRD_NDArray * | arr )

Reads an array from the data file.

## ismrmrd_read_header()

char * ISMRMRD::ismrmrd_read_header | ( | const ISMRMRD_Dataset * | dset | ) |

Reads the XML configuration header from the dataset.

Warning
  There is no check of whether the string is a valid XML document at this point.

## ismrmrd_read_image()

int ISMRMRD::ismrmrd_read_image | ( | const ISMRMRD_Dataset * | dset,
|  | const char * | varname,
|  | const uint32_t | index,
|  | ISMRMRD_Image * | im )

Reads an image stored with appendImage. The index indicates which image to read from the variable named varname.

## ismrmrd_read_waveform()

int ISMRMRD::ismrmrd_read_waveform | ( | const ISMRMRD_Dataset * | dset,
|  | uint32_t | index,
|  | ISMRMRD_Waveform * | wav )

Reads the wveformith the specified index from the dataset.

## ismrmrd_write_header()

int ISMRMRD::ismrmrd_write_header | ( | const ISMRMRD_Dataset * | dset,
|  | const char * | xmlstring )

Writes the XML header string to the dataset.

Warning
  There is no check of whether the string is a valid XML document at this point.