snake.core.phantom.static
#
Module to create phantom for simulation.
Module Contents#
Classes#
Enum for the tissue properties. |
|
Enum for the tissue properties file. |
|
A Phantom consist of a list of tissue mask and parameters for those tissues. |
Functions#
Serialize the array for mrd compatible format. |
|
Unserialize the array for mrd compatible format. |
Data#
API#
- class snake.core.phantom.static.PropTissueEnum[source]#
Bases:
enum.IntEnum
Enum for the tissue properties.
Initialization
Initialize self. See help(type(self)) for accurate signature.
- T1 = 0#
- T2 = 1#
- T2s = 2#
- rho = 3#
- chi = 4#
- class snake.core.phantom.static.TissueFile[source]#
Bases:
str
,snake._meta.NoCaseEnum
Enum for the tissue properties file.
Initialization
Initialize self. See help(type(self)) for accurate signature.
- tissue_1T5 = 'str(...)'#
- tissue_7T = 'str(...)'#
- class snake.core.phantom.static.Phantom[source]#
A Phantom consist of a list of tissue mask and parameters for those tissues.
- masks: numpy.typing.NDArray[numpy.float32] = None#
- labels: numpy.typing.NDArray[numpy.string_] = None#
- props: numpy.typing.NDArray[numpy.float32] = None#
- add_tissue(tissue_name: str, mask: numpy.typing.NDArray[numpy.float32], props: numpy.typing.NDArray[numpy.float32], phantom_name: str | None = None) snake.core.phantom.static.Phantom [source]#
Add a tissue to the phantom. Creates a new Phantom object.
- make_smaps(n_coils: int = None, sim_conf: snake.core.simulation.SimConfig = None, antenna: str = 'birdcage') None [source]#
Get coil sensitivity maps for the phantom.
- classmethod from_brainweb(sub_id: int, sim_conf: snake.core.simulation.SimConfig, tissue_file: str | snake.core.phantom.static.TissueFile = TissueFile.tissue_1T5, tissue_select: list[str] | None = None, tissue_ignore: list[str] | None = None) snake.core.phantom.static.Phantom [source]#
Get the Brainweb Phantom.
- abstract classmethod from_shepp_logan(resolution: tuple[int]) snake.core.phantom.static.Phantom [source]#
Get the Shepp-Logan Phantom.
- abstract classmethod from_guerin_kern(resolution: tuple[int]) snake.core.phantom.static.Phantom [source]#
Get the Guerin-Kern Phantom.
- classmethod from_mrd_dataset(dataset: ismrmrd.Dataset | os.PathLike, imnum: int = 0) snake.core.phantom.static.Phantom [source]#
Load the phantom from a mrd dataset.
- to_mrd_dataset(dataset: ismrmrd.Dataset, sim_conf: snake.core.simulation.SimConfig, imnum: int = 0) ismrmrd.Dataset [source]#
Add the phantom as an image to the dataset.
Give access the tissue masks and properties in shared memory.
Add a copy of the phantom in shared memory.
- __deepcopy__(memo: Any) snake.core.phantom.static.Phantom [source]#
Create a copy of the phantom.
- copy() snake.core.phantom.static.Phantom [source]#
Return deep copy of the Phantom.
- snake.core.phantom.static.T = 'TypeVar(...)'#