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:
- 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.
- 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.
Add an optional
array_transform: ArrayTransform | Nonefield toopenlifu.db.session.SolutionInfocapturing the transducer array-to-volumetransform matrix that was used when the corresponding
Solutionwascomputed.
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:
time, the PNP moves to the new pose rather than staying where it was
computed.
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
SolutionInfoprovenance record. Consumers snap the transducer to thatmatrix on display, so the PNP is invariant under later approval churn.
Details
SolutionInfo.array_transform: ArrayTransform | None(defaultNonefor legacy round-trips).__post_init__accepts a dict transparently soSession.from_dictdecoding
solutionsentries produces the correct type.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.