Skip to content

Add array_transform to SolutionInfo to preserve compute-time transducer pose #491

Description

@peterhollender

Add an optional array_transform: ArrayTransform | None field to
openlifu.db.session.SolutionInfo capturing the transducer array-to-volume
transform matrix that was used when the corresponding Solution was
computed.

Motivation

Downstream (SlicerOpenLIFU) currently renders a solution's PNP / intensity
volumes by parenting them under the transducer's transform node, then snapping
the transducer to whichever virtual-fit or transducer-tracking result is
currently approved. This means:

  1. If the currently-approved VF / TT changes between compute time and display
    time, the PNP moves to the new pose rather than staying where it was
    computed.
  2. For a pre-solution (computed off a VF result), the VF approval may later
    be revoked; there is then no way to display the solution at its original
    pose because no transform survives.

The fix is to persist the exact matrix used at compute time on the
SolutionInfo provenance record. Consumers snap the transducer to that
matrix on display, so the PNP is invariant under later approval churn.

Details

  • New field SolutionInfo.array_transform: ArrayTransform | None (default
    None for legacy round-trips).
  • __post_init__ accepts a dict transparently so Session.from_dict
    decoding solutions entries produces the correct type.
  • Round-trip tests added in tests/test_database.py.

Downstream

Tracked in SlicerOpenLIFU#622: "Pre-Solution PNP overlay renders at wrong
position when navigating to Sonication Planner". That issue's fix consumes
this new field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions