Phantom#
- class snake.core.phantom.static.Phantom(name, masks, labels, props)[source]#
Bases:
object
A Phantom consist of a list of tissue mask and parameters for those tissues.
Methods
__init__
Add a tissue to the phantom.
Get the Brainweb Phantom.
Get the Guerin-Kern Phantom.
Load the phantom from a mrd dataset.
Give access the tissue masks and properties in shared memory.
Get the Shepp-Logan Phantom.
Add a copy of the phantom in shared memory.
Add the phantom as an image to the dataset.
Attributes
Get the shape of the base volume.
Get the number of tissues.
name
masks
labels
props
- Parameters:
- add_tissue(tissue_name, mask, props, phantom_name=None)[source]#
Add a tissue to the phantom. Creates a new Phantom object.
- classmethod from_brainweb(sub_id, sim_conf, tissue_file=TissueFile.tissue_1T5, tissue_select=None, tissue_ignore=None)[source]#
Get the Brainweb Phantom.
Give access the tissue masks and properties in shared memory.
- Parameters:
name (str)
mask_prop (ArrayProps)
properties_prop (ArrayProps)
label_prop (ArrayProps)
- Return type:
Add a copy of the phantom in shared memory.
- Parameters:
manager (SharedMemoryManager)
- Return type:
tuple[tuple[str, ArrayProps, ArrayProps, ArrayProps], tuple[SharedMemory, SharedMemory, SharedMemory]]