pa_devices

class MSOTAcuityEcho(device_position_mm: Optional[ndarray] = None, field_of_view_extent_mm: Optional[ndarray] = None)[source]

Bases: PhotoacousticDevice

This class represents a digital twin of the MSOT Acuity Echo, manufactured by iThera Medical, Munich, Germany (https://www.ithera-medical.com/products/msot-acuity/). It is based on the real specifications of the device, but due to the limitations of the possibilities how to represent a device in the software frameworks, constitutes only an approximation.

The origin for this device is the center of the membrane at the point of contact between the membrane and the tissue, i.e. the outer center of the membrane.

Some important publications that showcase the use cases of the MSOT Acuity and Acuity Echo device are:

Regensburger, Adrian P., et al. "Detection of collagens by multispectral optoacoustic
tomography as an imaging biomarker for Duchenne muscular dystrophy."
Nature Medicine 25.12 (2019): 1905-1915.

Knieling, Ferdinand, et al. "Multispectral Optoacoustic Tomography for Assessment of
Crohn's Disease Activity."
The New England journal of medicine 376.13 (2017): 1292.
Parameters:
  • device_position_mm (ndarray) – Each device has an internal position which serves as origin for internal representations of e.g. detector element positions or illuminator positions.

  • field_of_view_extent_mm (ndarray) – Field of view which is defined as a numpy array of the shape [xs, xe, ys, ye, zs, ze], where x, y, and z denote the coordinate axes and s and e denote the start and end positions.

static deserialize(dictionary_to_deserialize)[source]
serialize() dict[source]
update_settings_for_use_of_model_based_volume_creator(global_settings: Settings)[source]

Updates the volume creation settings of the model based volume creator according to the size of the device. :param global_settings: Settings for the entire simulation pipeline. :type global_settings: Settings

class InVision256TF(device_position_mm: Optional[ndarray] = None, field_of_view_extent_mm: ndarray = array([-20, 20, 0, 0, -20, 20]))[source]

Bases: PhotoacousticDevice

This class represents a digital twin of the InVision 256-TF, manufactured by iThera Medical, Munich, Germany (https://www.ithera-medical.com/products/msot-invision/). It is based on the real specifications of the device, but due to the limitations of the possibilities how to represent a device in the software frameworks, constitutes only an approximation.

Some important publications that showcase the use cases of the InVision series devices are:

Joseph, James, et al. "Evaluation of precision in optoacoustic tomography
for preclinical imaging in living subjects."
Journal of Nuclear Medicine 58.5 (2017): 807-814.

Merčep, Elena, et al. "Whole-body live mouse imaging by hybrid
reflection-mode ultrasound and optoacoustic tomography."
Optics letters 40.20 (2015): 4643-4646.
Parameters:
  • device_position_mm (ndarray) – Each device has an internal position which serves as origin for internal representations of e.g. detector element positions or illuminator positions.

  • field_of_view_extent_mm (ndarray) – Field of view which is defined as a numpy array of the shape [xs, xe, ys, ye, zs, ze], where x, y, and z denote the coordinate axes and s and e denote the start and end positions.

static deserialize(dictionary_to_deserialize)[source]
serialize() dict[source]
class RSOMExplorerP50(element_spacing_mm=0.02, number_elements_x=10, number_elements_y=10, device_position_mm: Optional[ndarray] = None, field_of_view_extent_mm: Optional[ndarray] = None)[source]

Bases: PhotoacousticDevice

This class represents an approximation of the Raster-scanning Optoacoustic Mesoscopy (RSOM) device built by iThera Medical (Munich, Germany). Please refer to the companie’s website for more information (https://www.ithera-medical.com/products/rsom-explorer-p50/).

Since simulating thousands of individual forward modeling steps to obtain a single raster-scanned image is computationally not feasible, we approximate the process with a device design that has detection elements across the entire field of view. Because of this limitation we also need to approximate the light source with a homogeneous illumination across the field of view.

The digital device is modeled based on the reported specifications of the RSOM Explorer P50 system. Technical details of the system can be found in the dissertation of Mathias Schwarz (https://mediatum.ub.tum.de/doc/1324031/1324031.pdf) and you can find more details on use cases of the device in the following literature sources:

Yew, Yik Weng, et al. "Raster-scanning optoacoustic mesoscopy (RSOM) imaging
as an objective disease severity tool in atopic dermatitis patients."
Journal of the American Academy of Dermatology (2020).

Hindelang, B., et al. "Non-invasive imaging in dermatology and the unique
potential of raster-scan optoacoustic mesoscopy."
Journal of the European Academy of Dermatology and Venereology
33.6 (2019): 1051-1061.
Parameters:
  • element_spacing_mm (float) – Detection element pitch in both x- and y-direction. It is an isotropic spacing assumed.

  • number_elements_x (int) – Number of detection elements in x-direction.

  • number_elements_y (int) – Number of detection elements in y-direction.

  • device_position_mm (ndarray) – Each device has an internal position which serves as origin for internal representations of e.g. detector element positions or illuminator positions.

  • field_of_view_extent_mm (ndarray) – Field of view which is defined as a numpy array of the shape [xs, xe, ys, ye, zs, ze], where x, y, and z denote the coordinate axes and s and e denote the start and end positions.

static deserialize(dictionary_to_deserialize)[source]
serialize() dict[source]
class PhotoacousticDevice(device_position_mm=None, field_of_view_extent_mm=None)[source]

Bases: DigitalDeviceTwinBase, ABC

Base class of a photoacoustic device. It consists of one detection geometry that describes the geometry of the single detector elements and a list of illuminators.

A Photoacoustic Device can be initialized as follows:

import simpa as sp
import numpy as np

# Initialise a PhotoacousticDevice with its position and field of view
device = sp.PhotoacousticDevice(device_position_mm=np.array([10, 10, 0]),
    field_of_view_extent_mm=np.array([-20, 20, 0, 0, 0, 20]))

# Option 1) Set the detection geometry position relative to the PhotoacousticDevice
device.set_detection_geometry(sp.DetectionGeometry(),
    detector_position_relative_to_pa_device=np.array([0, 0, -10]))

# Option 2) Set the detection geometry position absolute
device.set_detection_geometry(
    sp.DetectionGeometryBase(device_position_mm=np.array([10, 10, -10])))

# Option 1) Add the illumination geometry position relative to the PhotoacousticDevice
device.add_illumination_geometry(sp.IlluminationGeometry(),
    illuminator_position_relative_to_pa_device=np.array([0, 0, 0]))

# Option 2) Add the illumination geometry position absolute
device.add_illumination_geometry(
    sp.IlluminationGeometryBase(device_position_mm=np.array([10, 10, 0]))
detection_geometry

Geometry of the detector elements.

Type:

DetectionGeometryBase

illumination_geometries

List of illuminations defined by IlluminationGeometryBase.

Type:

list

Parameters:
  • device_position_mm (ndarray) – Each device has an internal position which serves as origin for internal representations of e.g. detector element positions or illuminator positions.

  • field_of_view_extent_mm (ndarray) – Field of view which is defined as a numpy array of the shape [xs, xe, ys, ye, zs, ze], where x, y, and z denote the coordinate axes and s and e denote the start and end positions.

add_illumination_geometry(illumination_geometry, illuminator_position_relative_to_pa_device=None)[source]

Adds an illuminator to the PA device. The illumination geometry can be instantiated with an absolute position or it can be instantiated without the device_position_mm argument but a position relative to the position of the PhotoacousticDevice. If both absolute and relative positions are given, the absolute position is chosen as position of the illumination geometry.

Parameters:
  • illumination_geometry (IlluminationGeometryBase) – Geometry of the illuminator.

  • illuminator_position_relative_to_pa_device (ndarray) – Position of the illuminator relative to the PA device.

Raises:

ValueError – if the illumination_geometry is None

check_settings_prerequisites(global_settings) bool[source]

It might be that certain device geometries need a certain dimensionality of the simulated PAI volume, or that it requires the existence of certain Tags in the global global_settings. To this end, a PAI device should use this method to inform the user about a mismatch of the desired device and throw a ValueError if that is the case.

Parameters:

global_settings (Settings) – Settings for the entire simulation pipeline.

Raises:

ValueError – raises a value error if the prerequisites are not matched.

Returns:

True if the prerequisites are met, False if they are not met, but no exception has been raised.

Return type:

bool

static deserialize(dictionary_to_deserialize)[source]
get_detection_geometry()[source]
Returns:

None if no detection geometry was set or an instance of DetectionGeometryBase.

Return type:

None, DetectionGeometryBase

get_illumination_geometry()[source]
Returns:

None, if no illumination geometry was defined, an instance of IlluminationGeometryBase if exactly one geometry was defined, a list of IlluminationGeometryBase instances if more than one device was defined.

Return type:

None, IlluminationGeometryBase

serialize() dict[source]
set_detection_geometry(detection_geometry, detector_position_relative_to_pa_device=None)[source]

Sets the detection geometry for the PA device. The detection geometry can be instantiated with an absolute position or it can be instantiated without the device_position_mm argument but a position relative to the position of the PhotoacousticDevice. If both absolute and relative positions are given, the absolute position is chosen as position of the detection geometry.

Parameters:
  • detection_geometry (DetectionGeometryBase) – Detection geometry of the PA device.

  • detector_position_relative_to_pa_device (ndarray) – Position of the detection geometry relative to the PA device.

Raises:

ValueError – if the detection_geometry is None

update_settings_for_use_of_model_based_volume_creator(global_settings)[source]

This method can be overwritten by a PA device if the device poses special constraints to the volume that should be considered by the model-based volume creator.

Parameters:

global_settings (Settings) – Settings for the entire simulation pipeline.