load_ismrmd#
- deepinv.utils.load_ismrmd(fname, data_name='kspace', data_slice=None, **kwargs)[source]#
Load complex MRI data from ISMRMD format.
Uses
h5pyto load data specified bydata_namekey. The data is assumed to be stored in complex type.Note
To speed up loading, slice/index the data before converting to tensor.
- Parameters:
fname (str, pathlib.Path) – file to load.
data_name (str) – key of data in file, defaults to “kspace”.
data_slice (tuple) – slice or index to use before converting to tensor, such as
int,sliceortupleof these.
- Returns:
data loaded in
torch.Tensorof shape(2, ...)containing real and imaginary parts, where...are dimensions of the raw data.- Return type: