pyanno4rt.optimization.components._maximum_dvh

Maximum dose-volume histogram (Maximum DVH) component.

Overview

Classes

MaximumDVH

Maximum dose-volume histogram (Maximum DVH) component class.

Function

compute(dose, parameter_value)

Compute the component value.

differentiate(dose, parameter_value, number_of_voxels, segment_indices)

Compute the component gradient.

Classes

class pyanno4rt.optimization.components._maximum_dvh.MaximumDVH(target_dose=None, quantile_volume=None, embedding='active', weight=1.0, rank=1, bounds=None, link=None, identifier=None, display=True)[source]

Bases: pyanno4rt.optimization.components.ConventionalComponentClass

Maximum dose-volume histogram (Maximum DVH) component class.

This class provides methods to compute the value and the gradient of the maximum DVH component.

Parameters:
  • target_dose (int or float) – Target value for the dose.

  • quantile_volume (int or float) – Volume level at which to evaluate the dose quantile.

  • embedding ({'active', 'passive'}, default='active') – Mode of embedding for the component. In ‘passive’ mode, the component value is computed and tracked, but not considered in the optimization problem, unlike in ‘active’ mode.

  • weight (int or float, default=1.0) – Weight of the component function.

  • rank (int, default=1) – Rank of the component in the lexicographic order.

  • bounds (None or list, default=None) – Constraint bounds for the component.

  • link (None or list, default=None) – Other segments used for joint evaluation.

  • identifier (None or str, default=None) – Additional string for naming the component.

  • display (bool, default=True) – Indicator for the display of the component.

parameter_value

Value of the component parameters.

Type:

list

Overview

Methods

compute_value(*args)

Return the component value from the jitted ‘compute’ function.

compute_gradient(*args)

Return the component gradient from the jitted ‘differentiate’ function.

Members

compute_value(*args)[source]

Return the component value from the jitted ‘compute’ function.

Parameters:

*args (tuple) – Keyworded parameters, where args[0] must be the dose vector(s) to evaluate.

Returns:

Value of the component function.

Return type:

float

compute_gradient(*args)[source]

Return the component gradient from the jitted ‘differentiate’ function.

Parameters:

*args (tuple) – Keyworded parameters, where args[0] must be the dose vector(s) to evaluate and args[1] the corresponding segment(s).

Returns:

Value of the component gradient.

Return type:

ndarray

Functions

pyanno4rt.optimization.components._maximum_dvh.compute(dose, parameter_value)

Compute the component value.

Parameters:
  • dose (tuple) – Values of the dose in the segment(s).

  • parameter_value (list) – Value of the component parameters.

Returns:

Value of the component function.

Return type:

float

pyanno4rt.optimization.components._maximum_dvh.differentiate(dose, parameter_value, number_of_voxels, segment_indices)

Compute the component gradient.

Parameters:
  • dose (tuple) – Values of the dose in the segment(s).

  • parameter_value (list) – Value of the component parameters.

  • number_of_voxels (int) – Total number of dose voxels.

  • segment_indices (tuple) – Indices of the segment(s).

Returns:

Value of the component gradient.

Return type:

ndarray