app.tools.mrd_provider#
Tools to provide ISMRM raw data.
Attributes#
Functions#
|
Build a file path: /data_lake/{protocol_id}/{task_id}/{result_id}/*.mrd |
|
Locate the .mrd file from a stored result's directory and file list. |
|
Build index. |
Load raw data slice. |
|
|
Parse ids. |
Module Contents#
- app.tools.mrd_provider.DATA_LAKE_DIR#
- app.tools.mrd_provider.RANGE_RE#
- app.tools.mrd_provider.locate_mrd(protocol_id: str, task_id: str, result_id: str) pathlib.Path#
Build a file path: /data_lake/{protocol_id}/{task_id}/{result_id}/*.mrd
- app.tools.mrd_provider.find_mrd_file(directory: str, files: list[str]) pathlib.Path#
Locate the .mrd file from a stored result’s directory and file list.
Used with the flat task-directory layout where the Result DB record stores the actual directory and filenames directly.
- app.tools.mrd_provider.build_index_meta(file_path: str) list[scanhub_libraries.models.MRDAcquisitionInfo]#
Build index.
- app.tools.mrd_provider.load_acquisitions_slices(file_path: pathlib.Path, acquisition_indices: collections.abc.Iterable[int], coil_idx: int = 0, stride: int = 1, dataset_idx: int = 0) collections.abc.Iterable[numpy.ndarray]#
Load raw data slice.
- app.tools.mrd_provider.parse_ids(expr: str) list[int]#
Parse ids.