mr2.phantoms.IsmrmrdDataset
- class mr2.phantoms.IsmrmrdDataset[source]
-
Dataset of standard ISMRMRD files.
Directories are searched recursively for
.h5,.hdf5, and.mrdHDF5 files (including HDF5 files with an.mrdsuffix). Downloader staging directories named.mr2-downloadsare excluded from discovery. Serialized streams are not supported. Files are naturally sorted, and each item is loaded asKData. Construction only selects local paths and never downloads data or reads headers. Non-Cartesian data require an explicittrajectory. UseDataLoader(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:
path (
str|PathLike|Sequence[str|PathLike]) – Directory, raw file, or explicit sequence of raw files.trajectory (
KTrajectoryCalculator|KTrajectory|KTrajectoryIsmrmrd|None, default:None) – Trajectory calculator or trajectory. Cartesian is used by default.header_overwrites (
Mapping[str,object] |None, default:None) – Values passed tofrom_file().dataset_idx (
int, default:-1) – ISMRMRD group index within each file.acquisition_filter_criterion (
Callable[[Acquisition],bool], default:is_image_acquisition) – Predicate selecting acquisitions within each file.
- load(filename: str | PathLike) KData[source]
Load an ISMRMRD file using this dataset’s loading options.
- __eq__(value, /)
Return self==value.
- __new__(**kwargs)