config
Config for the generic en-face lesion calculation step (v1).
Classes
LesionCalculationConfig
class LesionCalculationConfig(**data: Any):Config for the generic lesion calculation step.
Attributes
groups: Named label groups to measure. Each produces one column per entry inLESION_GROUP_METRIC_SUFFIXES, named<group>_<metric>. An empty map makes the step a no-op.roi_radius_mm: Radius in mm of a region of interest centred on the fovea landmark, orNoneto measure only the whole-scan aggregates. This is a RADIUS, not a diameter: a protocol naming a 3000 µm diameter region is configured as1.5.Nonewhen no fovea landmark is available for a scan, regardless of this setting.max_lesions_per_group: Cap on how many lesions ameasure_lesionsgroup reports in detail per scan; the largest are kept. Does not affect the group's own totals (total_area,num_lesions, …), which are never capped.angular_span_min_radius_mm: Cells closer than this to the fovea contribute no angle toaggregate_angular_span.None(the default) measures from the fovea outwards, which is the previous behaviour.
It exists because the span has no angular RESOLUTION close in: the B-scan sampling gives about degrees(slice_thickness / r) per sector end, so a single cell one column from the fovea subtends about 176 degrees and two of them pass a 270-degree threshold. That is the B-scan spacing, not a rounding error, and no in-plane exactness recovers it.
A value here changes who is recruited, so it is a clinical decision and belongs in a trial's config where it is visible, not in a geometry constant. It lives on the STEP rather than on a criterion because the measurement is genuinely restricted at compute time — the same reason roi_radius_mm does — which means changing it rotates the cache partition and recomputes every scan.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Ancestors
Variables
- static
angular_span_min_radius_mm : float | None
- static
groups : dict[str, MaskGroupSpec]
- static
max_lesions_per_group : int
- static
model_config
- static
roi_radius_mm : float | None