snake.mrd_utils.writer
#
Export data to mrd format.
Module Contents#
Functions#
Create a MRD Header for snake-fmri data. |
|
Add the dynamic data to the dataset. |
|
Add the Smaps to the dataset. |
|
Create a base .mrd file from the simulation configurations. |
Data#
API#
- snake.mrd_utils.writer.get_mrd_header(sim_conf: snake.core.simulation.SimConfig, engine: str, model: str, slice_2d: bool) ismrmrd.xsd.ismrmrdHeader [source]#
Create a MRD Header for snake-fmri data.
- snake.mrd_utils.writer.add_dynamic_mrd(dataset: ismrmrd.Dataset, dynamic: snake.core.phantom.DynamicData, sim_conf: snake.core.simulation.SimConfig) ismrmrd.Dataset [source]#
Add the dynamic data to the dataset.
- snake.mrd_utils.writer.add_coil_cov_mrd(dataset: ismrmrd.Dataset, sim_conf: snake.core.simulation.SimConfig, coil_cov: numpy.typing.NDArray | None = None) ismrmrd.Dataset [source]#
Add the Smaps to the dataset.
- snake.mrd_utils.writer.make_base_mrd(filename: os.PathLike, sampler: snake.core.sampling.BaseSampler, phantom: snake.core.phantom.Phantom, sim_conf: snake.core.simulation.SimConfig, handlers: list[snake.core.handlers.AbstractHandler] | snake.core.handlers.HandlerList | None = None, coil_cov: numpy.typing.NDArray | None = None, model: str = 'simple', slice_2d: bool = False) ismrmrd.Dataset [source]#
Create a base .mrd file from the simulation configurations.
- Parameters:
filename (os.PathLike) β The output filename.
sampler (BaseSampler) β The sampling pattern generator.
phantom (Phantom) β The phantom object.
sim_conf (SimConfig) β The simulation configurations.
dynamic_data (list[DynamicData], optional) β The dynamic data, by default None
smaps (NDArray, optional) β The coil sensitivity maps, by default None
coil_covar (NDArray, optional) β The coil covariance matrix, by default None