mr2.phantoms.IsmrmrdDataset

class mr2.phantoms.IsmrmrdDataset[source]

Bases: Dataset[KData]

Dataset of standard ISMRMRD files.

Directories are searched recursively for .h5, .hdf5, and .mrd HDF5 files (including HDF5 files with an .mrd suffix). Downloader staging directories named .mr2-downloads are excluded from discovery. Serialized streams are not supported. Files are naturally sorted, and each item is loaded as KData. Construction only selects local paths and never downloads data or reads headers. Non-Cartesian data require an explicit trajectory. Use DataLoader(dataset, batch_size=None) to iterate without applying PyTorch’s default collation to KData objects.

__init__(path: str | PathLike | Sequence[str | PathLike], trajectory: KTrajectoryCalculator | KTrajectory | KTrajectoryIsmrmrd | None = None, header_overwrites: Mapping[str, object] | None = None, dataset_idx: int = -1, acquisition_filter_criterion: Callable[[Acquisition], bool] = is_image_acquisition) → None[source]

Initialize the dataset.

Parameters:
load(filename: str | PathLike) → KData[source]

Load an ISMRMRD file using this dataset’s loading options.

__eq__(value, /)

Return self==value.

__new__(**kwargs)