detection_geometries
- class CurvedArrayDetectionGeometry(pitch_mm=0.5, radius_mm=40, number_detector_elements=256, detector_element_width_mm=0.24, detector_element_length_mm=13, center_frequency_hz=3960000.0, bandwidth_percent=55, sampling_frequency_mhz=40, angular_origin_offset=3.141592653589793, device_position_mm=None, field_of_view_extent_mm=None)[source]
Bases:
DetectionGeometryBase
This class represents a digital twin of a ultrasound detection device with a curved detection geometry. The origin for this device is the center (focus) of the curved array.
- Parameters:
pitch_mm – In-plane distance between the beginning of one detector element to the next detector element.
radius_mm –
number_detector_elements –
detector_element_width_mm –
detector_element_length_mm –
center_frequency_hz –
bandwidth_percent –
sampling_frequency_mhz –
angular_origin_offset –
device_position_mm – Center (focus) of the curved array.
- 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:
- get_detector_element_orientations() ndarray [source]
This method yields a normalised orientation vector for each detection element. The length of this vector is the same as the one obtained via the position methods:
get_detector_element_positions_base_mm get_detector_element_positions_accounting_for_device_position_mm
- Returns:
a numpy array that contains normalised orientation vectors for each detection element
- get_detector_element_positions_base_mm() ndarray [source]
Defines the abstract positions of the detection elements in an arbitrary coordinate system. Typically, the center of the field of view is defined as the origin.
To obtain the positions in an interpretable coordinate system, please use the other method:
get_detector_element_positions_accounting_for_device_position_mm
- Returns:
A numpy array containing the position vectors of the detection elements.
- 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.
- class DetectionGeometryBase(number_detector_elements, detector_element_width_mm, detector_element_length_mm, center_frequency_hz, bandwidth_percent, sampling_frequency_mhz, device_position_mm: Optional[ndarray] = None, field_of_view_extent_mm: Optional[ndarray] = None)[source]
Bases:
DigitalDeviceTwinBase
This class is the base class for representing all detector geometries.
- Parameters:
number_detector_elements (int) – Total number of detector elements.
detector_element_width_mm (int, float) – In-plane width of one detector element (pitch - distance between two elements) in mm.
detector_element_length_mm (int, float) – Out-of-plane length of one detector element in mm.
center_frequency_hz (int, float) – Center frequency of the detector with approximately gaussian frequency response in Hz.
bandwidth_percent (int, float) – Full width at half maximum in percent of the center frequency.
sampling_frequency_mhz (int, float) – Sampling frequency of the detector in MHz.
device_position_mm (ndarray) – Each device has an internal position which serves as origin for internal representations of detector 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.
- abstract get_detector_element_orientations() ndarray [source]
This method yields a normalised orientation vector for each detection element. The length of this vector is the same as the one obtained via the position methods:
get_detector_element_positions_base_mm get_detector_element_positions_accounting_for_device_position_mm
- Returns:
a numpy array that contains normalised orientation vectors for each detection element
- get_detector_element_positions_accounting_for_device_position_mm() ndarray [source]
Similar to:
get_detector_element_positions_base_mm
This method returns the absolute positions of the detection elements relative to the device position in the imaged volume, where the device position is defined by the following tag:
Tags.DIGITAL_DEVICE_POSITION
- Returns:
A numpy array containing the coordinates of the detection elements
- get_detector_element_positions_accounting_for_field_of_view() ndarray [source]
Similar to:
get_detector_element_positions_base_mm
This method returns the absolute positions of the detection elements relative to the device position in the imaged volume, where the device position is defined by the following tag:
Tags.DIGITAL_DEVICE_POSITION
- Returns:
A numpy array containing the coordinates of the detection elements
- abstract get_detector_element_positions_base_mm() ndarray [source]
Defines the abstract positions of the detection elements in an arbitrary coordinate system. Typically, the center of the field of view is defined as the origin.
To obtain the positions in an interpretable coordinate system, please use the other method:
get_detector_element_positions_accounting_for_device_position_mm
- Returns:
A numpy array containing the position vectors of the detection elements.
- class LinearArrayDetectionGeometry(pitch_mm=0.5, number_detector_elements=100, detector_element_width_mm=0.24, detector_element_length_mm=0.5, center_frequency_hz=3960000.0, bandwidth_percent=55, sampling_frequency_mhz=40, device_position_mm: Optional[ndarray] = None, field_of_view_extent_mm: Optional[ndarray] = None)[source]
Bases:
DetectionGeometryBase
This class represents a digital twin of a ultrasound detection device with a linear detection geometry. The origin for this device is the center of the linear array, so approximately the position of the (number_detector_elements/2)th detector element.
- Parameters:
pitch_mm –
number_detector_elements –
detector_element_width_mm –
detector_element_length_mm –
center_frequency_hz –
bandwidth_percent –
sampling_frequency_mhz –
device_position_mm – Center of the linear array.
- check_settings_prerequisites(global_settings: 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:
- get_detector_element_orientations() ndarray [source]
This method yields a normalised orientation vector for each detection element. The length of this vector is the same as the one obtained via the position methods:
get_detector_element_positions_base_mm get_detector_element_positions_accounting_for_device_position_mm
- Returns:
a numpy array that contains normalised orientation vectors for each detection element
- get_detector_element_positions_base_mm() ndarray [source]
Defines the abstract positions of the detection elements in an arbitrary coordinate system. Typically, the center of the field of view is defined as the origin.
To obtain the positions in an interpretable coordinate system, please use the other method:
get_detector_element_positions_accounting_for_device_position_mm
- Returns:
A numpy array containing the position vectors of the detection elements.
- 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.
- class PlanarArrayDetectionGeometry(pitch_mm=0.5, number_detector_elements_x=100, number_detector_elements_y=100, detector_element_width_mm=0.24, detector_element_length_mm=0.5, center_frequency_hz=3960000.0, bandwidth_percent=55, sampling_frequency_mhz=40, device_position_mm: Optional[ndarray] = None, field_of_view_extent_mm: Optional[ndarray] = None)[source]
Bases:
DetectionGeometryBase
This class represents a digital twin of a ultrasound detection device with a linear detection geometry. The origin for this device is the center of the planar array.
- Parameters:
pitch_mm –
number_detector_elements_x –
number_detector_elements_y –
detector_element_width_mm –
detector_element_length_mm –
center_frequency_hz –
bandwidth_percent –
sampling_frequency_mhz –
device_position_mm – Center of the planar array.
- check_settings_prerequisites(global_settings: 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:
- get_detector_element_orientations() ndarray [source]
This method yields a normalised orientation vector for each detection element. The length of this vector is the same as the one obtained via the position methods:
get_detector_element_positions_base_mm get_detector_element_positions_accounting_for_device_position_mm
- Returns:
a numpy array that contains normalised orientation vectors for each detection element
- get_detector_element_positions_base_mm() ndarray [source]
Defines the abstract positions of the detection elements in an arbitrary coordinate system. Typically, the center of the field of view is defined as the origin.
To obtain the positions in an interpretable coordinate system, please use the other method:
get_detector_element_positions_accounting_for_device_position_mm
- Returns:
A numpy array containing the position vectors of the detection elements.
- 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.