Update openlifu imports#565
Conversation
openlifu no longer eagerly exports classes from its top-level __init__, so all references to openlifu.Protocol, openlifu.Transducer, openlifu.Point, openlifu.Solution, openlifu.Database, and openlifu.VirtualFitOptions are updated to use their full submodule paths. virtual_fit moved to openlifu.seg.virtual_fit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces openlifu_lz().io.LIFUInterface/LIFUInterfaceStatus with a new openlifu_sdk_lz() lazy loader, since LIFUInterface now lives in the separate openlifu-sdk package. Also adds explicit subpackage imports in openlifu_lz() to ensure openlifu submodules are accessible as attributes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3246594 to
60fab8f
Compare
LIFUInterface no longer exposes LIFUSignals; signals now come from OWSignal objects on hvcontroller and txdevice. Merges the old LIFUQtSignals and _LIFUInterfaceBridge classes into a single _LIFUBridge QObject, and extracts OWSignal wiring into _connect_owsignals() so both __init__ and reinitialize_lifu_interface use the same code path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@georgevigelette @alkagan Can you please test this branch with the hardware to confirm that the routing of signals works correctly? |
|
(Here is a package that can be used for testing if it is convenient to install from a package: 34046-linux-amd64-OpenLIFU-gitf078c02-2026-04-28.tar.gz) |
|
@stahir715 can you grab the package and test that it communicates correctly with the device? |
|
@sadhana-r I made some updates on a device plugged into a faulty console, which was great for checking the error handling, but still need to test on a good unit so I can run a sequence |
|
@sadhana-r, @ebrahimebrahim are you opposed to killing off |
|
I think it's still useful to have |
Huh, I didn't know it did that. The new requirements status display is great, though- maybe this functionality isn't needed anymore? I think the lz stuff makes the code a little confusing to read, since it has to do the type checking wizardry and the openlifu methods and classes are all imported from something other than |
I agree, it'd be nice not to have to deal with that. We could switch to ordinary lazy imports, just plain In the next version of Slicer, we'll have this nice So for now I think just switching to lazy |
Ah, that sounds like a nice middle route. Still using lazy importing to help with module initialization, but without the middle layer of the _lz class. Do you want to add that to my de-lz'ed branch? https://github.com/OpenwaterHealth/SlicerOpenLIFU/tree/p/streamline_openlifu |
Yes, I can add it there. Aiming to get to that this week |
|
Actually @peterhollender, I think your de-lz'ed branch is likely to have a lot of conflicts with this one here. They will touch the same exact lines: the openlifu imports and usages of openlifu_lz. This branch here is the more finnicky one that needs hardware testing, due to it dealing with the split out of openlifu-sdk from openlifu. So I think it makes sense to get this PR here integrated after a hardware (with a good unit). Then I can redo the de-lz'ing work along the lines mentioned above. It shouldn't take long, it would be quicker than rebasing your branch and handling the conflicts. Does that sound good? |
Before merging