utils

are_equal(obj1: Union[list, tuple, ndarray, object], obj2: Union[list, tuple, ndarray, object]) bool[source]

Compare if two objects are equal. For lists, tuples and arrays, all entries need to be equal to return True.

Parameters:
  • obj1 (Union[list, tuple, np.ndarray, object]) – The first object to compare. Can be of any type, but typically a list, numpy array, or scalar.

  • obj2 (Union[list, tuple, np.ndarray, object]) – The second object to compare. Can be of any type, but typically a list, numpy array, or scalar.

Returns:

True if the objects are equal, False otherwise. For lists and numpy arrays, returns True only if all corresponding elements are equal.

Return type:

bool

calculate_bvf(molecule_list: List) Union[float, int][source]

Calculate the blood volume fraction based on the volume fractions of deoxyhemoglobin and oxyhemoglobin.

Parameters:

molecule_list – List of molecules with their spectrum information and volume fractions.

Returns:

The blood volume fraction value between 0 and 1, or 0, if oxy and deoxy not present.

calculate_gruneisen_parameter_from_temperature(temperature_in_celcius: Union[float, int]) Union[float, int][source]

This function returns the dimensionless gruneisen parameter based on a heuristic formula that was determined experimentally:

@book{wang2012biomedical,
    title={Biomedical optics: principles and imaging},
    author={Wang, Lihong V and Wu, Hsin-i},
    year={2012},
    publisher={John Wiley & Sons}
}
Parameters:

temperature_in_celcius – the temperature in degrees celcius

Returns:

a floating point number, if temperature_in_celcius is a number or a float array, if temperature_in_celcius is an array

calculate_oxygenation(molecule_list: List) Optional[float][source]

Calculate the oxygenation level based on the volume fractions of deoxyhemoglobin and oxyhemoglobin.

Parameters:

molecule_list – List of molecules with their spectrum information and volume fractions.

Returns:

An oxygenation value between 0 and 1 if possible, or None if not computable.

create_spline_for_range(xmin_mm: Union[float, int] = 0, xmax_mm: Union[float, int] = 10, maximum_y_elevation_mm: Union[float, int] = 1, spacing: Union[float, int] = 0.1) tuple[source]

Creates a functional that simulates distortion along the y position between the minimum and maximum x positions. The elevation can never be smaller than 0 or bigger than maximum_y_elevation_mm.

Parameters:
  • xmin_mm – the minimum x axis value the return functional is defined in

  • xmax_mm – the maximum x axis value the return functional is defined in

  • maximum_y_elevation_mm – the maximum y axis value the return functional will yield

  • spacing – the voxel spacing in the simulation

Returns:

a functional that describes a distortion field along the y axis

extract_hemoglobin_fractions(molecule_list: List) Dict[str, float][source]

Extract hemoglobin volume fractions from a list of molecules.

Parameters:

molecule_list – List of molecules with their spectrum information and volume fractions.

Returns:

A dictionary with hemoglobin types as keys and their volume fractions as values.

min_max_normalization(data: Optional[ndarray] = None) ndarray[source]

Normalizes the given data by applying min max normalization. The resulting array has values between 0 and 1 inclusive.

Parameters:

data – (numpy array) data to be normalized

Returns:

(numpy array) normalized array

positive_gauss(mean, std) float[source]

Generates a non-negative random sample (scalar) from a normal (Gaussian) distribution.

:param mean : float defining the mean (“centre”) of the distribution. :param std: float defining the standard deviation (spread or “width”) of the distribution. Must be non-negative. :return: non-negative random sample from a normal (Gaussian) distribution.

randomize_uniform(min_value: float, max_value: float) Union[float, int][source]

returns a uniformly drawn random number in [min_value, max_value[

Parameters:
  • min_value – minimum value

  • max_value – maximum value

Returns:

random number in [min_value, max_value[

rotation(angles: Union[list, ndarray]) Tensor[source]

Rotation matrix around the x-, y-, and z-axis with angles [theta_x, theta_y, theta_z].

Parameters:

angles – Angles through which the matrix is supposed to rotate in the form of [theta_x, theta_y, theta_z].

Returns:

rotation matrix

rotation_matrix_between_vectors(a: ndarray, b: ndarray) ndarray[source]

Returns the rotation matrix from a to b

Parameters:
  • a – 3D vector to rotate

  • b – 3D target vector

Returns:

rotation matrix

rotation_x(theta: Union[float, int]) Tensor[source]

Rotation matrix around the x-axis with angle theta.

Parameters:

theta – Angle through which the matrix is supposed to rotate.

Returns:

rotation matrix

rotation_y(theta: Union[float, int]) Tensor[source]

Rotation matrix around the y-axis with angle theta.

Parameters:

theta – Angle through which the matrix is supposed to rotate.

Returns:

rotation matrix

rotation_z(theta: Union[float, int]) Tensor[source]

Rotation matrix around the z-axis with angle theta.

Parameters:

theta – Angle through which the matrix is supposed to rotate.

Returns:

rotation matrix

round_x5_away_from_zero(x: Union[float, ndarray]) Union[int, ndarray][source]

Round a number away from zero. The np.round function rounds x.5 to the nearest even number, which is not always the desired behavior. This function always rounds x.5 away from zero. For example, x.5 will be rounded to 1, and -x.5 will be rounded to -1. All other numbers are rounded to the nearest integer. :param x: input number or array of numbers :return: rounded number or array of numbers :rtype: int or np.ndarray of int

spline_evaluator2d_voxel(x: int, y: int, spline: Union[list, ndarray], offset_voxel: Union[float, int], thickness_voxel: int) bool[source]

Evaluate whether a given point (x, y) lies within the thickness bounds around a spline curve.

This function checks if the y-coordinate of a point lies within a vertical range defined around a spline curve at a specific x-coordinate. The range is determined by the spline elevation, an offset, and a thickness.

Parameters:
  • x – The x-coordinate of the point to evaluate.

  • y – The y-coordinate of the point to evaluate.

  • spline – A 1D array or list representing the spline curve elevations at each x-coordinate.

  • offset_voxel – The offset to be added to the spline elevation to define the starting y-coordinate of the range.

  • thickness_voxel – The vertical thickness of the range around the spline.

Returns:

True if the point (x, y) lies within the range around the spline, False otherwise.

EPS = 1e-20

Defines the smallest increment that should be considered by SIMPA.

class SegmentationClasses[source]

Bases: object

The segmentation classes define which “tissue types” are modelled in the simulation volumes.

AIR = 0
BLOOD = 3
BONE = 2
COUPLING_ARTIFACT = 10
DERMIS = 5
EPIDERMIS = 4
FAT = 6
GENERIC = -1
HEAVY_WATER = 9
LYMPH_NODE = 13
MEDIPRENE = 11
MUSCLE = 1
SOFT_TISSUE = 12
ULTRASOUND_GEL = 7
WATER = 8
create_deformation_settings(bounds_mm, maximum_z_elevation_mm=1, filter_sigma=1, cosine_scaling_factor=4)[source]

FIXME

get_functional_from_deformation_settings(deformation_settings: dict)[source]

FIXME

generate_dict_path(data_field, wavelength: (<class 'int'>, <class 'float'>) = None) str[source]

Generates a path within an hdf5 file in the SIMPA convention

Parameters:
  • data_field – Data field that is supposed to be stored in an hdf5 file.

  • wavelength – Wavelength of the current simulation.

Returns:

String which defines the path to the data_field.

get_data_field_from_simpa_output(simpa_output: dict, data_field: (<class 'tuple'>, <class 'str'>), wavelength: (<class 'int'>, <class 'float'>) = None)[source]

Navigates through a dictionary in the standard simpa output format to a specific data field.

Parameters:
  • simpa_output – Dictionary that is in the standard simpa output format.

  • data_field – Data field that is contained in simpa_output.

  • wavelength – Wavelength of the current simulation.

Returns:

Queried data_field.

generate_matlab_cmd(matlab_binary_path: str, simulation_script_path: str, data_path: str, additional_flags: List[str] = []) List[str][source]

Generates the MATLAB execution command from the given paths

Parameters:
  • matlab_binary_path (str) – path to the MATLAB binary file as defined by PathManager

  • simulation_script_path (str) – path to the MATLAB script that should be run (either simulate_2D.m or simulate_3D.m)

  • data_path (str) – path to the .mat file used for simulating

  • additional_flags (List[str]) – list of optional additional flags for MATLAB

Returns:

list of command parts

Return type:

List[str]

class PathManager(environment_path=None)[source]

Bases: object

As a pipelining tool that serves as a communication layer between different numerical forward models and processing tools, SIMPA needs to be configured with the paths to these tools on your local hard drive. To this end, we have implemented the PathManager class that you can import to your project using from simpa.utils import PathManager. The PathManager looks for a path_config.env file (just like the one we provided in the simpa_examples) in the following places in this order:

  1. The optional path you give the PathManager

  2. Your set environment variables

  3. Your $HOME$ directory

  4. The current working directory

  5. The SIMPA home directory path

Parameters:

environment_path – Per default, the config with the environment variables is located in /HOME/path_config.env

detect_local_path_config()[source]

This methods looks in the default local paths for a path_config.env file.

get_hdf5_file_save_path()[source]
get_matlab_binary_path()[source]
get_mcx_binary_path()[source]
get_path_from_environment(env_variable_name)[source]
get_processing_device(global_settings: Optional[Settings] = None) device[source]

Get device (CPU/GPU) for data processing. By default use GPU for fast computation, unless the user manually sets it to CPU. Of course, GPU is only used if available. The user receives a warning if GPU was specified but is not available, in this case processing is done on CPU as fall-back. :param global_settings: global settings defined by user :type global_settings: Settings :return: torch device for processing

profile(f)[source]
class SerializableSIMPAClass[source]

Bases: ABC

TODO

abstract static deserialize(dictionary_to_deserialize: dict)[source]
abstract serialize() dict[source]
class Settings(dictionary: Optional[dict] = None, verbose: bool = True)[source]

Bases: dict, SerializableSIMPAClass

The Settings class is a dictionary that contains all relevant settings for running a simulation in the SIMPA toolkit. It includes an automatic sanity check for input parameters using the simpa.utils.Tags class.

Usage: Settings({Tags.KEY1: value1, Tags.KEY2: value2, …})

static deserialize(dictionary_to_deserialize: dict)[source]
get_acoustic_settings()[source]

” Returns the settings for the acoustic forward model that are saved in this settings dictionary

get_optical_settings()[source]

” Returns the settings for the optical forward model that are saved in this settings dictionary

get_reconstruction_settings()[source]

” Returns the settings for the reconstruction model that are saved in this settings dictionary

get_volume_creation_settings()[source]

” Returns the settings for the optical forward model that are saved in this settings dictionary

get_volume_dimensions_voxels()[source]
returns: tuple

the x, y, and z dimension of the volumes as a tuple the volume dimension gets rounded after converting from a mm grid to a voxel grid of unit Tags.SPACING_MM.

serialize()[source]
set_acoustic_settings(acoustic_settings: dict)[source]

Replaces the currently stored acoustic forward model settings with the given dictionary

Parameters:

acoustic_settings – a dictionary containing the acoustic model settings

set_optical_settings(optical_settings: dict)[source]

Replaces the currently stored optical settings with the given dictionary

Parameters:

optical_settings – a dictionary containing the optical settings

set_reconstruction_settings(reconstruction_settings: dict)[source]

Replaces the currently stored reconstruction model settings with the given dictionary

Parameters:

reconstruction_settings – a dictionary containing the reconstruction model settings

set_volume_creation_settings(volume_settings: dict)[source]

Replaces the currently stored volume creation settings with the given dictionary

Parameters:

volume_settings – a dictionary containing the volume creator settings

class Tags[source]

Bases: object

This class contains all ‘Tags’ for the use in the settings dictionary as well as strings that are used in SIMPA as naming conventions. Every Tag that is intended to be used as a key in the settings dictionary is represented by a tuple. The first element of the tuple is a string that corresponds to the name of the Tag. The second element of the tuple is a data type or a tuple of data types. The values that are assigned to the keys in the settings should match these data types. Their usage within the SIMPA package is divided in “SIMPA package”, “module X”, “adapter Y”, “class Z” and “naming convention”.

ACOUSTIC_LOG_SCALE = ('acoustic_log_scale', (<class 'bool'>, <class 'numpy.bool_'>))

If True, the movie of the kwave simulation will be recorded in a log scale.

Usage: adapter KwaveAcousticForwardModel

ACOUSTIC_MODEL = ('acoustic_model', <class 'str'>)

Choice of the used acoustic model.

Usage: module acoustic_forward_module

ACOUSTIC_MODEL_BINARY_PATH = ('acoustic_model_binary_path', <class 'str'>)

Absolute path of the location of the acoustic forward model binary.

Usage: module optical_simulation_module

ACOUSTIC_MODEL_K_WAVE = 'kwave'

Corresponds to the kwave simulaiton.

Usage: module acoustic_forward_module, naming convention

ACOUSTIC_MODEL_OUTPUT_NAME = 'acoustic_forward_model_output'

Name of the acoustic forward model output field in the SIMPA output file.

Usage: naming convention

ACOUSTIC_MODEL_SETTINGS = ('acoustic_model_settings', <class 'dict'>)

Acoustic model settings.

ACOUSTIC_MODEL_TEST = 'simpa_tests'

Corresponds to an adapter for testing purposes only.

Usage: module acoustic_forward_module, naming convention

ACOUSTIC_SIMULATION_3D = ('acoustic_simulation_3d', <class 'bool'>)

If True, simulates the acoustic forward model in 3D.

Usage: SIMPA package

ADDITIONAL_FLAGS = ('additional_flags', typing.Iterable)

Defines a sequence of extra flags to be parsed to executables for simulation modules. Caution: The user is responsible for checking if these flags exist and don’t break the predefined flags’ behaviour. It is assumed that if flags are specified multiple times the flag provided last is considered. This can for example be used to override predefined flags.

ADHERE_TO_DEFORMATION = ('adhere_to_deformation', <class 'bool'>)

If True, a structure will be shifted according to the deformation.

Usage: adapter versatile_volume_creation

BACKGROUND = 'Background'

Corresponds to the name of a structure.

Usage: adapter versatile_volume_creation, naming convention

BANDPASS_CUTOFF_HIGHPASS_IN_HZ = ('bandpass_cuttoff_highpass_in_HZ', <class 'numbers.Number'>)

Sets the cutoff threshold in Hz for highpass filtering, i.e. lower limit of the tukey filter. Default is 0.1 MHz

Usage: adapter PyTorchDASAdapter

BANDPASS_CUTOFF_LOWPASS_IN_HZ = ('bandpass_cuttoff_lowpass_in_HZ', <class 'numbers.Number'>)

Sets the cutoff threshold in Hz for lowpass filtering, i.e. upper limit of the tukey filter. Default is 8 MHz

Usage: adapter PyTorchDASAdapter

BANDPASS_FILTER_METHOD = ('bandpass_filtering_method', <class 'str'>)

Choice of the bandpass filtering method used, i.e. tukey or butterworth filter .

Usage: ReconstructionAdapterBase

BUTTERWORTH_BANDPASS_FILTER = 'butterworth_bandpass_filter'

Corresponds to the tukey bandpass filter

Usage: reconstruction utils

BUTTERWORTH_FILTER_ORDER = ('butterworth_filter_order', (<class 'int'>, <class 'numpy.integer'>))

Sets the order of the filter, usually between 1 and 5. Default is 1

Usage: reconstruction utils

CHILD_STRUCTURES = ('child_structures', <class 'dict'>)

Settings dictionary which contains all the child structures of a parent structure.

Usage: module volume_creation_module

CIRCULAR_TUBULAR_STRUCTURE = 'CircularTubularStructure'

Corresponds to the CircularTubularStructure in the structure_library.

Usage: module volume_creation_module, naming_convention

COMPUTE_DIFFUSE_REFLECTANCE = 'save_diffuse_reflectance'

Flag that indicates if the diffuse reflectance should be stored in voxels that are filled with 0 in the surrounding of the volume. Usage: simpa.core.simulation_modules.optical_simulation_module.optical_forward_model_mcx_reflectance_adapter

COMPUTE_PHOTON_DIRECTION_AT_EXIT = 'save_dir_at_exit'

Flag that indicates if the direction of photons when they exit the volume should be stored Usage: simpa.core.simulation_modules.optical_simulation_module.optical_forward_model_mcx_reflectance_adapter

CONSIDER_PARTIAL_VOLUME = ('consider_partial_volume', <class 'bool'>)

If True, the structure will be generated with its edges only occupying a partial volume of the voxel.

Usage: adapter versatile_volume_creation

CONSIDER_PARTIAL_VOLUME_IN_DEVICE = ('consider_partial_volume_in_device', <class 'bool'>)

If True, the structures inside the device (i.e. US gel and membrane) will be generated with its edges only occupying a partial volume of the voxel.

Usage: adapter versatile_volume_creation

CONTINUE_SIMULATION = ('continue_simulation', <class 'bool'>)

Boolean whether the user just wants to continue a previously existing simulation or if they want to start a new simulation from scratch. In case of continuation, the simulation script doesn’t overwrite the existing file. Usage: SIMPA package

CROP_POSITION_BOTTOM = 'bottom'

along bottom edge of image Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

Type:

Flag indicating the crop position

CROP_POSITION_CENTRE = 'centre'

along centre edge of image Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

Type:

Flag indicating the crop position

CROP_POSITION_LEFT = 'left'

along left-hand edge of image Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

Type:

Flag indicating the crop position

CROP_POSITION_RANDOM = 'random'

random placement Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

Type:

Flag indicating the crop position

CROP_POSITION_RIGHT = 'right'

along right-hand edge of image Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

Type:

Flag indicating the crop position

CROP_POSITION_TOP = 'top'

along top edge of image Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

Type:

Flag indicating the crop position

DATA_FIELD = 'data_field'

Defines which data field a certain function shall be applied to.

Usage: module core.processing_components

DATA_FIELD_ABSORPTION_PER_CM = 'mua'

Optical absorption of the generated volume/structure in 1/cm.

Usage: SIMPA package, naming convention

DATA_FIELD_ALPHA_COEFF = 'alpha_coeff'

Acoustic attenuation of kwave of the generated volume/structure in dB/cm/MHz.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

DATA_FIELD_ANISOTROPY = 'g'

Optical scattering anisotropy of the generated volume/structure.

Usage: SIMPA package, naming convention

DATA_FIELD_BLOOD_VOLUME_FRACTION = 'bvf'

Blood volume fraction of the generated volume/structure.

Usage: SIMPA package, naming convention

DATA_FIELD_DENSITY = 'density'

Density of the generated volume/structure in kg/m³.

Usage: SIMPA package, naming convention

DATA_FIELD_DIFFUSE_REFLECTANCE = 'diffuse_reflectance'

Identifier for the diffuse reflectance values at the surface of the volume (interface to 0-values voxels) Usage: simpa.core.simulation_modules.optical_simulation_module.optical_forward_model_mcx_reflectance_adapter

DATA_FIELD_DIFFUSE_REFLECTANCE_POS = 'diffuse_reflectance_pos'

Identified for the position within the volumes where the diffuse reflectance was originally stored, interface to 0-values voxels Usage: simpa.core.simulation_modules.optical_simulation_module.optical_forward_model_mcx_reflectance_adapter

DATA_FIELD_FLUENCE = 'fluence'

Name of the optical forward model output fluence field in the SIMPA output file.

Usage: naming convention

DATA_FIELD_GRUNEISEN_PARAMETER = 'gamma'

We define PROPERTY_GRUNEISEN_PARAMETER to contain all wavelength-independent constituents of the PA signal. This means that it contains the percentage of absorbed light converted into heat. Naturally, one could make an argument that this should not be the case, however, it simplifies the usage of this tool.

Usage: SIMPA package, naming convention

DATA_FIELD_INITIAL_PRESSURE = 'initial_pressure'

Name of the optical forward model output initial pressure field in the SIMPA output file.

Usage: naming convention

DATA_FIELD_OXYGENATION = 'oxy'

Oxygenation of the generated volume/structure.

Usage: SIMPA package, naming convention

DATA_FIELD_PHOTON_EXIT_DIR = 'photon_exit_dir'

Identifier for the direction of photons when they exit the volume. Currently only photon exiting along the Z axis are detected. Usage: simpa.core.simulation_modules.optical_simulation_module.optical_forward_model_mcx_reflectance_adapter

DATA_FIELD_PHOTON_EXIT_POS = 'photon_exit_pos'

Identifier for the position where photons exit the volume. Currently only photon exiting along the Z axis are detected. Usage: simpa.core.simulation_modules.optical_simulation_module.optical_forward_model_mcx_reflectance_adapter

DATA_FIELD_RECONSTRUCTED_DATA = 'reconstructed_data'

Name of the reconstructed data field in the SIMPA output file.

Usage: naming convention

DATA_FIELD_SCATTERING_PER_CM = 'mus'

Optical scattering (NOT REDUCED SCATTERING mus’! mus’=mus*(1-g) ) of the generated volume/structure in 1/cm.

Usage: SIMPA package, naming convention

DATA_FIELD_SEGMENTATION = 'seg'

Segmentation of the generated volume/structure.

Usage: SIMPA package, naming convention

DATA_FIELD_SPEED_OF_SOUND = 'sos'

Speed of sound of the generated volume/structure in m/s.

Usage: SIMPA package, naming convention

DATA_FIELD_TIME_SERIES_DATA = 'time_series_data'

Name of the time series data field in the SIMPA output file.

Usage: naming convention

DEFORMATION_X_COORDINATES_MM = 'deformation_x_coordinates'

Array that defines the x coordinates of the deformation.

Usage: adapter versatile_volume_creation, naming convention

DEFORMATION_Y_COORDINATES_MM = 'deformation_y_coordinates'

Array that defines the y coordinates of the deformation.

Usage: adapter versatile_volume_creation, naming convention

DEFORMATION_Z_ELEVATIONS_MM = 'deformation_z_elevation'

Mesh that defines the z coordinates of the deformation.

Usage: adapter versatile_volume_creation, naming convention

DEFORMED_LAYERS_SETTINGS = ('deformed_layers_settings', <class 'dict'>)

Settings that contain the functional which defines the deformation of the layers.

Usage: adapter versatile_volume_creation

DETECTOR_ELEMENT_WIDTH_MM = 'detector_element_width_mm'

Width of a detector element. Corresponds to the pitch - the distance between two detector element borders.

Usage: module acoustic_forward_module, naming convention

DIGITAL_DEVICE = 'digital_device'

Digital device that is chosen as illumination source and detector for the simulation.

Usage: SIMPA package

DIGITAL_DEVICE_MSOT_ACUITY = 'digital_device_msot'

Corresponds to the MSOTAcuityEcho device.

Usage: SIMPA package, naming convention

DIGITAL_DEVICE_MSOT_INVISION = 'digital_device_invision'

Corresponds to the InVision 256-TF device.

Usage: SIMPA package, naming convention

DIGITAL_DEVICE_POSITION = ('digital_device_position', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Position in [x, y, z] coordinates of the device in the generated volume.

Usage: SIMPA package

DIGITAL_DEVICE_RSOM = 'digital_device_rsom'

Corresponds to the RSOMExplorerP50 device.

Usage: SIMPA package, naming convention

DIGITAL_DEVICE_SLIT_ILLUMINATION_LINEAR_DETECTOR = 'digital_device_slit_illumination_linear_detector'

Corresponds to a PA device with a slit as illumination and a linear array as detection geometry.

Usage: SIMPA package, naming convention

DIM_VOLUME_X_MM = ('volume_x_dim_mm', <class 'numbers.Number'>)

Extent of the x-axis of the generated volume.

Usage: SIMPA package

DIM_VOLUME_Y_MM = ('volume_y_dim_mm', <class 'numbers.Number'>)

Extent of the y-axis of the generated volume.

Usage: SIMPA package

DIM_VOLUME_Z_MM = ('volume_z_dim_mm', <class 'numbers.Number'>)

Extent of the z-axis of the generated volume.

Usage: SIMPA package

DOWNSCALE_FACTOR = ('downscale_factor', (<class 'int'>, <class 'float'>, <class 'numpy.int64'>))

Downscale factor of the resampling in the qPAI reconstruction

Usage: module algorithms (iterative_qPAI_algorithm.py)

DO_FILE_COMPRESSION = ('minimize_file_size', (<class 'bool'>, <class 'numpy.bool_'>))

If not set to False, the HDF5 file will be optimised after the simulations are done. Usage: simpa.core.simulation.simulate

DO_IPASC_EXPORT = ('do_ipasc_export', (<class 'bool'>, <class 'numpy.bool_'>))

Flag which determines whether the simulated time series data (if available) will be exported into the IPASC data format. Usage: module io_handling, core

ELLIPTICAL_TUBULAR_STRUCTURE = 'EllipticalTubularStructure'

Corresponds to the EllipticalTubularStructure in the structure_library.

Usage: module volume_creation_module, naming_convention

GPU = ('gpu', (<class 'bool'>, <class 'numpy.bool_'>))

If True, uses all available gpu options of the used modules.

Usage: SIMPA package

HORIZONTAL_LAYER_STRUCTURE = 'HorizontalLayerStructure'

Corresponds to the HorizontalLayerStructure in the structure_library.

Usage: module volume_creation_module, naming_convention

IGNORE_QA_ASSERTIONS = ('ignore_qa_assertions', <class 'bool'>)

Flag which presents any quality assessment to run during the simulation. False by default. Only set to True if the pipeline is thoroughly tested. Usage: core

ILLUMINATION_DIRECTION = ('illumination_direction', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Direction of the photon source as [x, y, z] vector used in mcx.

Usage: module optical_modelling, adapter mcx_adapter

ILLUMINATION_PARAM1 = ('illumination_param1', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

First parameter group of the specified illumination type as [x, y, z, w] vector used in mcx.

Usage: module optical_modelling, adapter mcx_adapter

ILLUMINATION_PARAM2 = ('illumination_param2', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Second parameter group of the specified illumination type as [x, y, z, w] vector used in mcx.

Usage: module optical_modelling, adapter mcx_adapter

ILLUMINATION_POSITION = ('illumination_position', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Position of the photon source in [x, y, z] coordinates used in mcx.

Usage: module optical_modelling, adapter mcx_adapter

ILLUMINATION_TYPE = ('optical_model_illumination_type', <class 'str'>)

Type of the illumination geometry used in mcx.

Usage: module optical_modelling, adapter mcx_adapter

ILLUMINATION_TYPE_DISK = 'disk'

Corresponds to disk source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_DKFZ_PAUS = 'pasetup'

Corresponds to pasetup source in mcx. The geometrical definition is described in:

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_FOURIER = 'fourier'

Corresponds to fourier source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_FOURIER_X = 'fourierx'

Corresponds to fourierx source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_FOURIER_X_2D = 'fourierx2d'

Corresponds to fourierx2d source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_GAUSSIAN = 'gaussian'

Corresponds to gaussian source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_IPASC_DEFINITION = 'ipasc'

Corresponds to a source definition in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_MSOT_ACUITY_ECHO = 'msot_acuity_echo'

s Corresponds to msot_acuity_echo source in mcx. The device is manufactured by iThera Medical, Munich, Germany (https: // www.ithera-medical.com / products / msot-acuity /).

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_MSOT_INVISION = 'invision'

Corresponds to a source definition in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_PATTERN = 'pattern'

Corresponds to pattern source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_PATTERN_3D = 'pattern3d'

Corresponds to pattern3d source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_PENCIL = 'pencil'

Corresponds to pencil source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_PENCILARRAY = 'pencilarray'

Corresponds to pencilarray source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_PLANAR = 'planar'

Corresponds to planar source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_RING = 'ring'

Corresponds to ring source in mcx.

Usage: adapter mcx_adapter, naming convention

ILLUMINATION_TYPE_SLIT = 'slit'

Corresponds to slit source in mcx.

Usage: adapter mcx_adapter, naming convention

IMAGE_PROCESSING = 'image_processing'

Location of the image algorithms outputs in the SIMPA output file.

Usage: naming convention

IMAGE_SCALING_CONSTANT = 'constant'

Flag indicating the use of a constant on edges during interpolation when rescaling an image The rest of the area will be filled by a constant value Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

IMAGE_SCALING_EDGE = 'edge'

Flag indicating the expansion of the edges during interpolation when rescaling an image The edge value will continue across the area Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

IMAGE_SCALING_STRETCH = 'stretch'

Flag indicating the use of reflection on edges during interpolation when rescaling an image At the boundary, the image will reflect to fill the area Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

IMAGE_SCALING_SYMMETRIC = 'symmetric'

Flag indicating the use of reflection on edges during interpolation when rescaling an image Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

IMAGE_SCALING_WRAP = 'wrap'

Flag indicating tessellating during interpolation when rescaling an image Usage: simpa.utils.libraries.structure_library.heterogeneity_generator

INPUT_SEGMENTATION_VOLUME = ('input_segmentation_volume', <class 'numpy.ndarray'>)

Array that defines a segmented volume.

Usage: adapter segmentation_based_volume_creator

ITERATIVE_RECONSTRUCTION_CONSTANT_REGULARIZATION = ('constant_regularization', (<class 'bool'>, <class 'numpy.bool_'>))

If True, the fluence regularization will be constant.

Usage: module algorithms (iterative_qPAI_algorithm.py)

ITERATIVE_RECONSTRUCTION_MAX_ITERATION_NUMBER = ('maximum_iteration_number', (<class 'int'>, <class 'numpy.integer'>))

Maximum number of iterations performed in iterative reconstruction if stopping criterion is not reached.

Usage: module algorithms (iterative_qPAI_algorithm.py)

ITERATIVE_RECONSTRUCTION_REGULARIZATION_SIGMA = ('regularization_sigma', <class 'numbers.Number'>)

Sigma value used for constant regularization of fluence.

Usage: module algorithms (iterative_qPAI_algorithm.py)

ITERATIVE_RECONSTRUCTION_SAVE_INTERMEDIATE_RESULTS = ('save_intermediate_results', (<class 'bool'>, <class 'numpy.bool_'>))

If True, a list of all intermediate absorption updates (middle slices only) will be saved in a numpy file.

Usage: module algorithms (iterative_qPAI_algorithm.py)

ITERATIVE_RECONSTRUCTION_SAVE_LAST_FLUENCE = ('save_last_fluence', (<class 'bool'>, <class 'numpy.bool_'>))

If True, the last simulated fluence before the stopping criterion will be saved in a numpy file.

Usage: module algorithms (iterative_qPAI_algorithm.py)

ITERATIVE_RECONSTRUCTION_STOPPING_LEVEL = ('iteration_stopping_level', <class 'numbers.Number'>)

Ratio of improvement and preceding error at which iteration method stops. Usage: module algorithms (iterative_qPAI_algorithm.py)

ITERATIVE_qPAI_RESULT = 'iterative_qpai_result'

Name of the data field in which the iterative qPAI result will be stored.

Usage: naming convention

KWAVE_PROPERTY_ALPHA_POWER = ('medium_alpha_power', <class 'numbers.Number'>)

Exponent of the exponential acoustic attenuation law of kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_DIRECTIVITY_ANGLE = 'directivity_angle'

Directionality of the sensors in kwave of the used PA device.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_INITIAL_PRESSURE_SMOOTHING = ('initial_pressure_smoothing', <class 'bool'>)

If True, the initial pressure is smoothed before simulated in kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_INTRINSIC_EULER_ANGLE = 'intrinsic_euler_angle'

Intrinsic euler angles of the detector elements in the kWaveArray.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_PMLAlpha = ('pml_alpha', <class 'numbers.Number'>)

Alpha coefficient of the “perfectly matched layer” (PML) around the simulated volume in kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_PMLInside = ('pml_inside', <class 'bool'>)

If True, the “perfectly matched layer” (PML) in kwave is located inside the volume.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_PMLSize = ('pml_size', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Size of the “perfectly matched layer” (PML) around the simulated volume in kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_PlotPML = ('plot_pml', <class 'bool'>)

If True, the “perfectly matched layer” (PML) around the simulated volume in kwave is plotted.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_SENSOR_MASK = 'sensor_mask'

Sensor mask of kwave of the used PA device.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

KWAVE_PROPERTY_SENSOR_RECORD = ('sensor_record', <class 'str'>)

Sensor Record mode of the sensor in kwave. Default should be “p”.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

K_WAVE_SPECIFIC_DT = ('dt_acoustic_sim', <class 'numbers.Number'>)

Temporal resolution of kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter

K_WAVE_SPECIFIC_NT = ('Nt_acoustic_sim', <class 'numbers.Number'>)

Total time steps simulated by kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter

LASER_PULSE_ENERGY_IN_MILLIJOULE = ('laser_pulse_energy_in_millijoule', (<class 'int'>, <class 'numpy.integer'>, <class 'float'>, <class 'list'>, <class 'range'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Laser pulse energy used in the optical simulation.

Usage: module optical_simulation_module

LINEAR_UNMIXING_COMPUTE_SO2 = ('linear_unmixing_compute_so2', <class 'bool'>)

If True the blood oxygen saturation is calculated and saved. This is only possible

if the OXYHEMOGLOBIN and DEOXYHEMOGLOBIN spectra are used.

Usage: module algorithms (linear_unmixing)

LINEAR_UNMIXING_NON_NEGATIVE = ('linear_unmixing_nonnegative', <class 'bool'>)

If True, non-negative linear unmixing is performed which solves the KKT (Karush-Kuhn-Tucker) conditions for the non-negative least squares problem.

Usage: module algorithms, linear unmixing

LINEAR_UNMIXING_RESULT = 'linear_unmixing_result'

Name of the data field in which the linear unmixing result will be stored.

Usage: naming convention

LINEAR_UNMIXING_SPECTRA = ('linear_unmixing_spectra', <class 'list'>)

List of spectra to use for linear unmixing.

Usage: module algorithms (linear_unmixing)

MATLAB_BINARY_PATH_VARNAME = 'MATLAB_BINARY_PATH'

Identifier for the environment varibale that defines the path the the matlab executable.

MAX_DEFORMATION_MM = 'max_deformation'

Maximum deformation in z-direction.

Usage: adapter versatile_volume_creation, naming convention

MCX_ASSUMED_ANISOTROPY = ('mcx_assumed_anisotropy', (<class 'int'>, <class 'float'>))

The anisotropy that should be assumed for the mcx simulations. If not set, a default value of 0.9 will be assumed. Usage: module optical_modelling, adapter mcx_adapter

MCX_BINARY_PATH_VARNAME = 'MCX_BINARY_PATH'

Identified for the environment varibale that defines the path to the MCX executable.

MCX_SEED = ('mcx_seed', (<class 'int'>, <class 'numpy.integer'>))

Specific seed for random initialisation in mcx.

if not set, Tags.RANDOM_SEED will be used instead. Usage: module optical_modelling, adapter mcx_adapter

MEDIUM_TEMPERATURE_CELCIUS = ('medium_temperature', <class 'numbers.Number'>)

Temperature of the simulated volume.

Usage: module noise_simulation

MODEL_SENSOR_FREQUENCY_RESPONSE = ('model_sensor_frequency_response', <class 'bool'>)

Boolean to decide whether to model the sensor frequency response in kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

MOLECULE_COMPOSITION = ('molecule_composition', <class 'list'>)

List that contains all the molecules within a structure.

Usage: module volume_creation_module

MOVIENAME = ('movie_name', <class 'str'>)

Name of the movie recorded by kwave.

Usage: adapter KwaveAcousticForwardModel

NOISE_FREQUENCY = 'noise_frequency'

Frequency of the noise model.

Usage: module core.processing_components.noise

NOISE_MAX = 'noise_max'

Max of a noise model.

Usage: module core.processing_components.noise

NOISE_MEAN = 'noise_mean'

Mean of a noise model.

Usage: module core.processing_components.noise

NOISE_MIN = 'noise_min'

Min of a noise model.

Usage: module core.processing_components.noise

NOISE_MODE = 'noise_mode'

The mode tag of a noise model is used to differentiate between

Tags.NOISE_MODE_ADDITIVE and Tags.NOISE_MODE_MULTIPLICATIVE.

Usage: module core.processing_components.noise

NOISE_MODE_ADDITIVE = 'noise_mode_additive'

A noise model shall be applied additively s_n = s + n.

Usage: module core.processing_components.noise

NOISE_MODE_MULTIPLICATIVE = 'noise_mode_multiplicative'

A noise model shall be applied multiplicatively s_n = s * n.

Usage: module core.processing_components.noise

NOISE_NON_NEGATIVITY_CONSTRAINT = 'noise_non_negativity_constraint'

Defines if after the noise model negative values shall be allowed.

Usage: module core.processing_components.noise

NOISE_SCALE = 'noise_scale'

Scale of a noise model.

Usage: module core.processing_components.noise

NOISE_SHAPE = 'noise_shape'

Shape of a noise model.

Usage: module core.processing_components.noise

NOISE_STD = 'noise_std'

Standard deviation of a noise model.

Usage: module core.processing_components.noise

OPTICAL_MODEL = ('optical_model', <class 'str'>)

Choice of the used optical model.

Usage: module optical_simulation_module

OPTICAL_MODEL_BINARY_PATH = ('optical_model_binary_path', <class 'str'>)

Absolute path of the location of the optical forward model binary.

Usage: module optical_simulation_module

OPTICAL_MODEL_ILLUMINATION_GEOMETRY_JSON_FILE = ('optical_model_illumination_geometry_json_file', <class 'str'>)

Absolute path of the location of the JSON file containing the IPASC-formatted optical forward model illumination geometry.

Usage: module optical_simulation_module

OPTICAL_MODEL_MCX = 'mcx'

Corresponds to the mcx simulation.

Usage: module optical_simulation_module, naming convention

OPTICAL_MODEL_NUMBER_PHOTONS = ('optical_model_number_of_photons', <class 'numbers.Number'>)

Number of photons used in the optical simulation.

Usage: module optical_simulation_module

OPTICAL_MODEL_OUTPUT_NAME = 'optical_forward_model_output'

Name of the optical forward model output field in the SIMPA output file.

Usage: naming convention

OPTICAL_MODEL_SETTINGS = ('optical_model_settings', <class 'dict'>)

Optical model settings

OPTICAL_MODEL_TEST = 'simpa_tests'

Corresponds to an adapter for testing purposes only.

Usage: module optical_simulation_module, naming convention

OPTICAL_MODEL_UNITS = 'units'

Name of the optical forward model output units field in the SIMPA output file.

Usage: naming convention

ORIGINAL_DATA = 'original_data'

Name of the simulation outputs as original data in the SIMPA output file.

Usage: naming convention

PARALLELEPIPED_STRUCTURE = 'ParallelepipedStructure'

Corresponds to the ParallelepipedStructure in the structure_library.

Usage: module volume_creation_module, naming_convention

PRIORITY = ('priority', <class 'numbers.Number'>)

Number that corresponds to a priority of the assigned structure. If another structure occupies the same voxel in a volume, the structure with a higher priority will be preferred.

Usage: adapter versatile_volume_creator

RANDOM_SEED = ('random_seed', <class 'numbers.Number'>)

Random seed for numpy and torch.

Usage: SIMPA package

RECONSTRUCTION_ALGORITHM = ('reconstruction_algorithm', <class 'str'>)

Choice of the used reconstruction algorithm.

Usage: module reconstruction_module

RECONSTRUCTION_ALGORITHM_DAS = 'DAS'

Corresponds to the reconstruction algorithm DAS with the MitkBeamformingAdapter.

Usage: module reconstruction_module, naming convention

RECONSTRUCTION_ALGORITHM_DMAS = 'DMAS'

Corresponds to the reconstruction algorithm DMAS with the MitkBeamformingAdapter.

Usage: module reconstruction_module, naming convention

RECONSTRUCTION_ALGORITHM_SDMAS = 'sDMAS'

Corresponds to the reconstruction algorithm sDMAS with the MitkBeamformingAdapter.

Usage: module reconstruction_module, naming convention

RECONSTRUCTION_ALGORITHM_TEST = 'TEST'

Corresponds to an adapter for testing purposes only.

Usage: module reconstruction_module, naming convention

RECONSTRUCTION_ALGORITHM_TIME_REVERSAL = 'time_reversal'

Corresponds to the reconstruction algorithm Time Reversal with TimeReversalAdapter.

Usage: module reconstruction_module, naming convention

RECONSTRUCTION_APODIZATION_BOX = 'BoxApodization'

Corresponds to the box window function for apodization.

Usage: adapter PyTorchDASAdapter, naming convention

RECONSTRUCTION_APODIZATION_HAMMING = 'HammingApodization'

Corresponds to the Hamming window function for apodization.

Usage: adapter PyTorchDASAdapter, naming convention

RECONSTRUCTION_APODIZATION_HANN = 'HannApodization'

Corresponds to the Hann window function for apodization.

Usage: adapter PyTorchDASAdapter, naming convention

RECONSTRUCTION_APODIZATION_METHOD = ('reconstruction_apodization_method', <class 'str'>)

Choice of the apodization method used, i.e. window functions .

Usage: adapter PyTorchDASAdapter

RECONSTRUCTION_BMODE_AFTER_RECONSTRUCTION = ('Envelope_Detection_after_Reconstruction', (<class 'bool'>, <class 'numpy.bool_'>))

Specifies whether an envelope detection should be performed after reconstruction, default is False Usage: adapter PyTorchDASAdapter

RECONSTRUCTION_BMODE_BEFORE_RECONSTRUCTION = ('Envelope_Detection_before_Reconstruction', (<class 'bool'>, <class 'numpy.bool_'>))

Specifies whether an envelope detection should be performed before reconstruction, default is False Usage: adapter PyTorchDASAdapter, naming convention

RECONSTRUCTION_BMODE_METHOD = ('reconstruction_bmode_method', <class 'str'>)

Choice of the B-Mode method used in the Mitk Beamforming.

Usage: adapter MitkBeamformingAdapter

RECONSTRUCTION_BMODE_METHOD_ABS = 'Abs'

Corresponds to the absolute value as the B-Mode method used in the Mitk Beamforming.

Usage: adapter MitkBeamformingAdapter, naming convention

RECONSTRUCTION_BMODE_METHOD_HILBERT_TRANSFORM = 'EnvelopeDetection'

Corresponds to the Hilbert transform as the B-Mode method used in the Mitk Beamforming.

Usage: adapter MitkBeamformingAdapter, naming convention

RECONSTRUCTION_INVERSE_CRIME = ('reconstruction_inverse_crime', (<class 'bool'>, <class 'numpy.bool_'>))

If True, the Time Reversal reconstruction will commit the “inverse crime”.

Usage: TimeReversalAdapter

RECONSTRUCTION_MITK_BINARY_PATH = ('reconstruction_mitk_binary_path', <class 'str'>)

Absolute path to the Mitk Beamforming script.

Usage: adapter MitkBeamformingAdapter

RECONSTRUCTION_MITK_SETTINGS_XML = ('reconstruction_mitk_settings_xml', <class 'str'>)

Absolute path to the Mitk Beamforming script settings.

Usage: adapter MitkBeamformingAdapter

RECONSTRUCTION_MODE = ('reconstruction_mode', <class 'str'>)

Choice of the reconstruction mode used in the Backprojection.

Usage: adapter BackprojectionAdapter

RECONSTRUCTION_MODEL_SETTINGS = ('reconstruction_model_settings', <class 'dict'>)

” Reconstruction Model Settings

RECONSTRUCTION_MODE_DIFFERENTIAL = 'differential'

Corresponds to the differential mode used in the Backprojection.

Usage: adapter BackprojectionAdapter, naming_convention

RECONSTRUCTION_MODE_FULL = 'full'

Corresponds to the full mode used in the Backprojection.

Usage: adapter BackprojectionAdapter, naming_convention

RECONSTRUCTION_MODE_PRESSURE = 'pressure'

Corresponds to the pressure mode used in the Backprojection.

Usage: adapter BackprojectionAdapter, naming_convention

RECONSTRUCTION_OUTPUT_NAME = ('reconstruction_result', <class 'str'>)

Absolute path of the image reconstruction result.

Usage: adapter MitkBeamformingAdapter

RECONSTRUCTION_PERFORM_BANDPASS_FILTERING = ('reconstruction_perform_bandpass_filtering', (<class 'bool'>, <class 'numpy.bool_'>))

Whether bandpass filtering should be applied or not. Default should be True

Usage: adapter PyTorchDASAdapter

RECONSTRUCTION_PERFORM_RESAMPLING_FOR_FFT = ('reconstruction_perform_resampling_for_fft', (<class 'bool'>, <class 'numpy.bool_'>))

Whether the data is resampled to a power of 2 in time dimension before applying the FFT and resampled back after filtering for performance reasons. Default should be False

Usage: adapter reconstruction_utils

RECORDMOVIE = ('record_movie', (<class 'bool'>, <class 'numpy.bool_'>))

If True, a movie of the kwave simulation will be recorded.

Usage: adapter KwaveAcousticForwardModel

RECTANGULAR_CUBOID_STRUCTURE = 'RectangularCuboidStructure'

Corresponds to the RectangularCuboidStructure in the structure_library.

Usage: module volume_creation_module, naming_convention

SEGMENTATION_CLASS_MAPPING = ('segmentation_class_mapping', <class 'dict'>)

Mapping that assigns every class in the INPUT_SEGMENTATION_VOLUME a MOLECULE_COMPOSITION.

Usage: adapter segmentation_based_volume_creator

SENSOR_BANDWIDTH_PERCENT = ('sensor_bandwidth', <class 'numbers.Number'>)

Sensor bandwidth in kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

SENSOR_CENTER_FREQUENCY_HZ = ('sensor_center_frequency', <class 'numbers.Number'>)

Sensor center frequency in kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

SENSOR_CONCAVE = 'concave'

Indicates that the geometry of the used PA device in the Mitk Beamforming is concave.

Usage: adapter MitkBeamformingAdapter, naming convention

SENSOR_DIRECTIVITY_PATTERN = 'sensor_directivity_pattern'

Sensor directivity pattern of the sensor in kwave. Default should be “pressure”.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

SENSOR_DIRECTIVITY_SIZE_M = ('sensor_directivity_size', <class 'numbers.Number'>)

Size of each detector element in kwave.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

SENSOR_ELEMENT_POSITIONS = 'sensor_element_positions'

Number of detector elements that fit into the generated volume if the dimensions and/or spacing of the generated volume were not highly resolved enough to be sufficient for the selected PA device.

Usage: module acoustic_forward_module, naming convention

SENSOR_LINEAR = 'linear'

Indicates that the geometry of the used PA device in the Mitk Beamforming is linear.

Usage: adapter MitkBeamformingAdapter, naming convention

SENSOR_NUM_ELEMENTS = ('sensor_num_elements', (<class 'int'>, <class 'numpy.integer'>))

Number of detector elements for kwave if no device was selected.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

SENSOR_NUM_USED_ELEMENTS = ('sensor_num_used_elements', (<class 'int'>, <class 'numpy.integer'>))

Number of detector elements that fit into the generated volume if the dimensions and/or spacing of the generated volume were not highly resolved enough to be sufficient for the selected PA device.

Usage: module acoustic_forward_module, naming convention

SENSOR_PITCH_MM = 'sensor_pitch_mm'

Pitch of detector elements of the used PA device.

Usage: adapter KWaveAdapter, naming convention

SENSOR_RADIUS_MM = 'sensor_radius_mm'

Radius of a concave geometry of the used PA device.

Usage: adapter KWaveAdapter, naming convention

SENSOR_SAMPLING_RATE_MHZ = ('sensor_sampling_rate_mhz', <class 'numbers.Number'>)

Sampling rate of the used PA device.

Usage: adapter KwaveAcousticForwardModel, adapter TimeReversalAdapter, naming convention

SETTINGS = 'settings'

Location of the simulation settings in the SIMPA output file.

Usage: naming convention

SIGNAL_THRESHOLD = ('linear_unmixing_signal_threshold', <class 'numbers.Number'>)

Number that specifies which fraction of the signal intensity is used for the specified processing algorithm.

Usage: module algorithms (linear_unmixing)

SIMPA_NAMED_ABSORPTION_SPECTRUM_COPPER_SULPHIDE = 'Copper_Sulphide'

List of wavelengths used in linear unmixing for copper sulphide chromophore.

Usage: module algorithms (linear_unmixing)

SIMPA_NAMED_ABSORPTION_SPECTRUM_DEOXYHEMOGLOBIN = 'Deoxyhemoglobin'

List of wavelengths used in linear unmixing for deoxyhemoglobin chromophore.

Usage: module algorithms (linear_unmixing)

SIMPA_NAMED_ABSORPTION_SPECTRUM_FAT = 'Fat'

List of wavelengths used in linear unmixing for fat chromophore.

Usage: module algorithms (linear_unmixing)

SIMPA_NAMED_ABSORPTION_SPECTRUM_MELANIN = 'Melanin'

List of wavelengths used in linear unmixing for melanin chromophore.

Usage: module algorithms (linear_unmixing)

SIMPA_NAMED_ABSORPTION_SPECTRUM_NICKEL_SULPHIDE = 'Nickel_Sulphide'

List of wavelengths used in linear unmixing for nickel sulphide chromophore.

Usage: module algorithms (linear_unmixing)

SIMPA_NAMED_ABSORPTION_SPECTRUM_OXYHEMOGLOBIN = 'Oxyhemoglobin'

Name of the spectrum file for oxyhemoglobin chromophore.

Usage: module algorithms, spectra_library, linear_unmixing

SIMPA_NAMED_ABSORPTION_SPECTRUM_WATER = 'Water'

List of wavelengths used in linear unmixing for water chromophore.

Usage: module algorithms (linear_unmixing)

SIMPA_OUTPUT_FILE_PATH = ('simpa_output_path', <class 'str'>)

Default path of the SIMPA output if not specified otherwise.

Usage: SIMPA package

SIMPA_OUTPUT_NAME = 'simpa_output.hdf5'

Default filename of the SIMPA output if not specified otherwise.

Usage: SIMPA package, naming convention

SIMPA_SAVE_DIRECTORY_VARNAME = 'SIMPA_SAVE_DIRECTORY'

Identifier for the environment variable that defines where the results generated with SIMPA will be sotred

SIMPA_VERSION = 'simpa_version'

Version number of the currently installed simpa package Usage: SIMPA package

SIMULATE_DEFORMED_LAYERS = ('simulate_deformed_layers', <class 'bool'>)

If True, the horizontal layers are deformed according to the DEFORMED_LAYERS_SETTINGS.

Usage: adapter versatile_volume_creation

SIMULATIONS = 'simulations'

Location of the simulation outputs in the SIMPA output file.

Usage: naming convention

SIMULATION_PATH = ('simulation_path', <class 'str'>)

Absolute path to the folder where the SIMPA output is saved.

Usage: SIMPA package

SIMULATION_PIPELINE = 'simulation_pipeline'

List of SimulationModules that are used within a simulation pipeline.

Usage: SIMPA package

SIMULATION_PROPERTIES = 'simulation_properties'

Location of the simulation properties in the SIMPA output file.

Usage: naming convention

SPACING_MM = ('voxel_spacing_mm', <class 'numbers.Number'>)

Isotropic extent of one voxels in mm in the generated volume.

Usage: SIMPA package

SPHERICAL_STRUCTURE = 'SphericalStructure'

Corresponds to the SphericalStructure in the structure_library.

Usage: module volume_creation_module, naming_convention

STRUCTURES = ('structures', <class 'dict'>)

Settings dictionary which contains all the structures that should be generated inside the volume.

Usage: module volume_creation_module

STRUCTURE_BIFURCATION_LENGTH_MM = ('structure_bifurcation_length_mm', <class 'numbers.Number'>)

Length after which a VesselStructure will bifurcate.

Usage: adapter versatile_volume_creation, class VesselStructure

STRUCTURE_CURVATURE_FACTOR = ('structure_curvature_factor', <class 'numbers.Number'>)

Factor that determines how strongly a vessel tree is curved.

Usage: adapter versatile_volume_creation, class VesselStructure

STRUCTURE_DIRECTION = ('structure_direction', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Direction as [x, y, z] vector starting from STRUCTURE_START_MM in which the vessel will grow.

Usage: adapter versatile_volume_creation, class VesselStructure

STRUCTURE_ECCENTRICITY = ('structure_excentricity', (<class 'numbers.Number'>, <class 'numpy.ndarray'>))

Eccentricity of the structure.

Usage: adapter versatile_volume_creation, class EllipticalTubularStructure

STRUCTURE_END_MM = ('structure_end', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Ending of the structure as [x, y, z] coordinates in the generated volume.

Usage: adapter versatile_volume_creation, class GeometricalStructure

STRUCTURE_FIRST_EDGE_MM = ('structure_first_edge_mm', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Edge of the structure as [x, y, z] vector starting from STRUCTURE_START_MM in the generated volume.

Usage: adapter versatile_volume_creation, class ParallelepipedStructure

STRUCTURE_RADIUS_MM = ('structure_radius', (<class 'numbers.Number'>, <class 'numpy.ndarray'>))

Radius of the structure.

Usage: adapter versatile_volume_creation, class GeometricalStructure

STRUCTURE_RADIUS_VARIATION_FACTOR = ('structure_radius_variation_factor', <class 'numbers.Number'>)

Factor that determines how strongly a the radius of vessel tree varies.

Usage: adapter versatile_volume_creation, class VesselStructure

STRUCTURE_SECOND_EDGE_MM = ('structure_second_edge_mm', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Edge of the structure as [x, y, z] vector starting from STRUCTURE_START_MM in the generated volume.

Usage: adapter versatile_volume_creation, class ParallelepipedStructure

STRUCTURE_SEGMENTATION_TYPE = 'structure_segmentation_type'

Defines the structure segmentation type to one segmentation type in SegmentationClasses.

Usage: module volume_creation_module, naming convention

STRUCTURE_START_MM = ('structure_start', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Beginning of the structure as [x, y, z] coordinates in the generated volume.

Usage: adapter versatile_volume_creation, class GeometricalStructure

STRUCTURE_THIRD_EDGE_MM = ('structure_third_edge_mm', (<class 'list'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Edge of the structure as [x, y, z] vector starting from STRUCTURE_START_MM in the generated volume.

Usage: adapter versatile_volume_creation, class ParallelepipedStructure

STRUCTURE_TYPE = ('structure_type', <class 'str'>)

Defines the structure type to one structure in the structure_library.

Usage: module volume_creation_module

STRUCTURE_X_EXTENT_MM = ('structure_x_extent_mm', <class 'numbers.Number'>)

X-extent of the structure in the generated volume.

Usage: adapter versatile_volume_creation, class RectangularCuboidStructure

STRUCTURE_Y_EXTENT_MM = ('structure_y_extent_mm', <class 'numbers.Number'>)

Y-extent of the structure in the generated volume.

Usage: adapter versatile_volume_creation, class RectangularCuboidStructure

STRUCTURE_Z_EXTENT_MM = ('structure_z_extent_mm', <class 'numbers.Number'>)

Z-extent of the structure in the generated volume.

Usage: adapter versatile_volume_creation, class RectangularCuboidStructure

TIME_STEP = ('time_step', <class 'numbers.Number'>)

Temporal resolution of mcx.

Usage: adapter mcx_adapter

TISSUE_PROPERTIES_OUPUT_NAME = 'properties'

Name of the simulation properties field in the SIMPA output file.

Usage: naming convention

TOTAL_TIME = ('total_time', <class 'numbers.Number'>)

Total simulated time in mcx.

Usage: adapter mcx_adapter

TUKEY_BANDPASS_FILTER = 'tukey_bandpass_filter'

Corresponds to the tukey bandpass filter

Usage: reconstruction utils

TUKEY_WINDOW_ALPHA = ('tukey_window_alpha', <class 'numbers.Number'>)

Sets alpha value of Tukey window between 0 (similar to box window) and 1 (similar to Hann window). Default is 0.5

Usage: adapter PyTorchDASAdapter

UNITS_ARBITRARY = 'arbitrary_unity'

Define arbitrary units if no units were given in the settings.

Usage: module optical_simulation_module, naming convention

UNITS_PRESSURE = 'newton_per_meters_squared'

Standard units used in the SIMPA framework.

Usage: module optical_simulation_module, naming convention

UPSAMPLED_DATA = 'upsampled_data'

Name of the simulation outputs as upsampled data in the SIMPA output file.

Usage: naming convention

US_GEL = ('us_gel', <class 'bool'>)

If True, us gel is placed between the PA device and the simulated volume.

Usage: SIMPA package

VESSEL_STRUCTURE = 'VesselStructure'

Digital Device Twin Settings

VOLUME_CREATION_MODEL_SETTINGS = ('volume_creation_model_settings', <class 'dict'>)

” Volume Creation Model Settings

VOLUME_CREATOR = ('volume_creator', <class 'str'>)

Choice of the volume creator adapter.

Usage: module volume_creation_module, module device_digital_twins

VOLUME_CREATOR_SEGMENTATION_BASED = 'segmentation_based_adapter'

Corresponds to the SegmentationBasedAdapter.

Usage: module volume_creation_module, naming convention

VOLUME_CREATOR_VERSATILE = 'volume_creator_versatile'

Corresponds to the ModelBasedVolumeCreator.

Usage: module volume_creation_module, naming convention

VOLUME_FRACTION = 'volume_fraction'

Identifier for the volume fraction for the simulation

VOLUME_NAME = ('volume_name', <class 'str'>)

Name of the SIMPA output file.

Usage: SIMPA package

WAVELENGTH = ('wavelength', <class 'numbers.Number'>)

Single wavelength used for the current simulation.

Usage: SIMPA package

WAVELENGTHS = ('wavelengths', (<class 'list'>, <class 'range'>, <class 'tuple'>, <class 'numpy.ndarray'>))

Iterable of all the wavelengths used for the simulation.

Usage: SIMPA package

class TissueProperties(settings: Settings)[source]

Bases: dict

The tissue properties contain a volumetric representation of each tissue parameter currently modelled in the SIMPA framework.

It is a dictionary that is populated with each of the parameters. The values of the parameters can be either numbers or numpy arrays. It also contains a volume fraction field.

static normalized_merge(property_list: list)[source]
static weighted_merge(property_list: list)[source]