Segmentation fault while using the UltrasoundSimulation algorithm

Hello,
I want to use the UltrasoundSimulation algorithm to compute a US simulation of a CT that is compatible with the algorithm.
When calling compute() I get a segmentation fault.
An OpenGL Context is available.

This is the error message:
[GL.Program] OpenGL shader ImFusionUS/UltrasoundSimulation.frag not found!
[GL.Program] Could not instantiate shader: Missing shader
[Core.Platform] ***** Encountered fatal exception: SIGSEGV - Segmentation violation signal, PID 13355 *****

This is the corresponding code:
ImFusion::us::UltrasoundSimulation sim(&*ct_image);
ImFusion::Slice::Corners corners(ImFusion::vec3(314, 110, 253),
ImFusion::vec3(219, 105, 254),
ImFusion::vec3(224, 105, 293),
ImFusion::vec3(298, 109, 300));
ImFusion::Slice slice(corners);
sim.setSlice(slice);
ImFusion::DataList dataList;
dataList.add(ct_image.get());
sim.compute();
The values for the corners are arbitrary.

Thank you in advance for your support.

Regards,
Ramsha

Dear Ramsha,

The error message “OpenGL shader […] not found” indicates that most likely your application did not initialize the ImFusionUS plugin. After initialization you should see a log message such as [Framework] Available Plugins: [...], ImFusionUS, [...].
In the demo project plugin loading is performed here. You probably need to adjust the paths to where the plugins are located on your system.

If it still doesn’t work, please post the full log output.

Cheers,
Christian

Hello Christian,

it works now. Thanks!