openlifu.virtual_fit.VirtualFitOptions

class openlifu.virtual_fit.VirtualFitOptions(units: Annotated[str, OpenLIFUFieldData(name='Length units', description='The units of length used in the length attributes of this class')] = 'mm', transducer_steering_center_distance: Annotated[float, OpenLIFUFieldData(name='Steering center distance', description='Distance from the transducer origin axially to the center of the steering zone in the units `units`')] = 50.0, steering_limits: Annotated[Tuple[Tuple[float, float], Tuple[float, float], Tuple[float, float]], OpenLIFUFieldData(name='Steering limits', description='Steering bounds along each axis from the transducer origin, in the units `units`')] = ((-50, 50), (-50, 50), (-50, 50)), pitch_range: Annotated[Tuple[float, float], OpenLIFUFieldData(name='Pitch range (deg)', description='Range of pitches to include in the transducer fitting search grid, in degrees')] = (-10, 150), pitch_step: Annotated[float, OpenLIFUFieldData(name='Pitch step size (deg)', description='Pitch step size when forming the transducer fitting search grid, in degrees')] = 5, yaw_range: Annotated[Tuple[float, float], OpenLIFUFieldData(name='Yaw range (deg)', description='Range of yaws to include in the transducer fitting search grid, in degrees')] = (-65, 65), yaw_step: Annotated[float, OpenLIFUFieldData(name='Yaw step size (deg)', description='Yaw step size when forming the transducer fitting search grid, in degrees')] = 5, planefit_dyaw_extent: Annotated[float, OpenLIFUFieldData(name='Plane fit yaw extent', description='Left and right extents of the point grid to be used for plane fitting along the local yaw axes, in units of `units`')] = 15, planefit_dyaw_step: Annotated[float, OpenLIFUFieldData(name='Plane fit yaw step', description='Local yaw axis step size to use when constructing plane fitting grids. In spatial units of `units`')] = 3, planefit_dpitch_extent: Annotated[float, OpenLIFUFieldData(name='Plane fit pitch extent', description='Left and right extents of the point grid to be used for plane fitting along the local pitch axes, in spatial units of `units`')] = 15, planefit_dpitch_step: Annotated[float, OpenLIFUFieldData(name='Plane fit pitch step', description='Local pitch axis step size to use when constructing plane fitting grids. In spatial units of `units`')] = 3, top_n_candidates: Annotated[int, OpenLIFUFieldData(name='No. of candidates returned', description='Sets the limit for the number of transducer transform candidates returned by the algorithm.')] = 4)[source]

Bases: DictMixin

Parameters to configure the virtual_fit algorithm.

The terms ‘pitch’ and ‘yaw’ used here refer to the following target-centric angular coordinates in patient space:
pitch: The angle between the anterior axis through the target and the ray from the target to the projection of

a given point into the anterior-superior plane.

yaw: The angle between the anterior-superior plane through the target and the ray from the target to a given point.

Another way to describe them in terms of standard spherical coordinates centered at the target in ASL (anterior-superior-left) space:

pitch: The azimuthal spherical coordinate. yaw: 90 degrees minus the polar spherical coordinate.

static from_dict(parameter_dict: Dict[str, Any]) VirtualFitOptions[source]

Create an object from a dictionary

Parameters:

parameter_dict – dictionary of parameters to define the object

Returns: new object

pitch_range: Annotated[Tuple[float, float], OpenLIFUFieldData(name='Pitch range (deg)', description='Range of pitches to include in the transducer fitting search grid, in degrees')] = (-10, 150)

Range of pitches to include in the transducer fitting search grid, in degrees

pitch_step: Annotated[float, OpenLIFUFieldData(name='Pitch step size (deg)', description='Pitch step size when forming the transducer fitting search grid, in degrees')] = 5

Pitch step size when forming the transducer fitting search grid, in degrees

planefit_dpitch_extent: Annotated[float, OpenLIFUFieldData(name='Plane fit pitch extent', description='Left and right extents of the point grid to be used for plane fitting along the local pitch axes, in spatial units of `units`')] = 15

Left and right extents of the point grid to be used for plane fitting along the local pitch axes, in spatial units of units. The plane fitting point grid will be twice this size, since this is left and right extents.

planefit_dpitch_step: Annotated[float, OpenLIFUFieldData(name='Plane fit pitch step', description='Local pitch axis step size to use when constructing plane fitting grids. In spatial units of `units`')] = 3

Local pitch axis step size to use when constructing plane fitting grids. In spatial units of units.

planefit_dyaw_extent: Annotated[float, OpenLIFUFieldData(name='Plane fit yaw extent', description='Left and right extents of the point grid to be used for plane fitting along the local yaw axes, in units of `units`')] = 15

Left and right extents of the point grid to be used for plane fitting along the local yaw axes, in units of units. The plane fitting point grid will be twice this size, since this is left and right extents. (Note that this has units of length, not angle!)

planefit_dyaw_step: Annotated[float, OpenLIFUFieldData(name='Plane fit yaw step', description='Local yaw axis step size to use when constructing plane fitting grids. In spatial units of `units`')] = 3

Local yaw axis step size to use when constructing plane fitting grids. In spatial units of units.

steering_limits: Annotated[Tuple[Tuple[float, float], Tuple[float, float], Tuple[float, float]], OpenLIFUFieldData(name='Steering limits', description='Steering bounds along each axis from the transducer origin, in the units `units`')] = ((-50, 50), (-50, 50), (-50, 50))

Distance from the transducer origin axially to the center of the steering zone in the units units

to_units(target_units: str) VirtualFitOptions[source]

Do unit conversion and return a version of this VirtualFitOptions that uses target_units as the units for all attributes that have units of length.

top_n_candidates: Annotated[int, OpenLIFUFieldData(name='No. of candidates returned', description='Sets the limit for the number of transducer transform candidates returned by the algorithm.')] = 4

Sets the limit for the number of transducer transform candidates returned by the algorithm.

transducer_steering_center_distance: Annotated[float, OpenLIFUFieldData(name='Steering center distance', description='Distance from the transducer origin axially to the center of the steering zone in the units `units`')] = 50.0

Distance from the transducer origin axially to the center of the steering zone in the units units

units: Annotated[str, OpenLIFUFieldData(name='Length units', description='The units of length used in the length attributes of this class')] = 'mm'

The units of length used in the length attributes of this class

yaw_range: Annotated[Tuple[float, float], OpenLIFUFieldData(name='Yaw range (deg)', description='Range of yaws to include in the transducer fitting search grid, in degrees')] = (-65, 65)

Range of yaws to include in the transducer fitting search grid, in degrees

yaw_step: Annotated[float, OpenLIFUFieldData(name='Yaw step size (deg)', description='Yaw step size when forming the transducer fitting search grid, in degrees')] = 5

Yaw step size when forming the transducer fitting search grid, in degrees