Hi,
When I load a saved workspace (.iws), the ultrasound simulation doesn’t automatically run. I tried adding 1 inside the simulation algorithm block, but then it throws an error saying the transducer spline isn’t defined.
I think the spline annotations (center and direction) are created after the simulation algorithm gets executed, so the simulation fails because the required inputs aren’t ready yet. (I also tried reordering the .iws file so that comes before , but it didn’t change anything)
In older versions of ImFusion, it seems there was no issue since the splines were defined directly inside the UltrasoundSimulationHybrid algorithm. For example: ImFusionHybridUSSimulator/USHybridSim_auto_generate_imgs_masks.iws at main · danivelikova/ImFusionHybridUSSimulator · GitHub
I also tried executing multiple iws files sequentially to define splines before, but I was not able to reference a data object that created from the previous script.
reproducing steps:
- Load a label map (vertebra.nii.gz)
- Ultrasound->Advanced->Hybrid Ultrasound Simulation
- Define center and direction splines
- Simulate Sweep
- Save workspace (ultrasound_simulation.iws) (log_ultrasound_simulation_before_saving.log)
- Load workspace ultrasound_simulation.iws (thats where it does not automatically execute simulation) (log_ultrasound_simulation_after_loading_script.log)
- add 1 to in the iws file (ultrasound_simulation2.iws)
- Load workspace (it gives error saying that: [SyntheticUltrasoundSweepAlgorithm] Transducer center spline is not defined yet.) (log_ultrasound_simulation2_after_loading_script.log)
Example files: ImFusion_Ultrasound_Simulation – Google Drive
Version:
[Base.Framework] Available Plugins: ImFusionAS, ImFusionCT, ImFusionDicom, ImFusionDicomGui, ImFusionImageMath, ImFusionLiveUS, ImFusionML, ImFusionPython, ImFusionReg, ImFusionSeg, ImFusionStream, ImFusionUS, ImFusionVision, TorchPlugin.
ImFusionLib Version 3.13.8 built on 2025-3-7.
ImFusion Suite for Academia - not for clinical use - Version 3.13.8
(C) 2012-2025 ImFusion GmbH, Munich, Germany
System Specs:
Python
[Base.Framework] Available Plugins: ImFusionAS, ImFusionCT, ImFusionDicom, ImFusionDicomGui, ImFusionImageMath, ImFusionLiveUS, ImFusionML, ImFusionPython, ImFusionReg, ImFusionSeg, ImFusionStream, ImFusionUS, ImFusionVision, TorchPlugin.
[GUI.MainWindowBase] OpenGL: 4.1 Metal - 89.4
[GUI.MainWindowBase] Vendor: Apple
[GUI.MainWindowBase] GPU: Apple M1
[GUI.MainWindowBase] Memory: 10.67 GB of 16 GB available