How to load the image streaming from opencv to 2D view

If you can capture the image into a numpy array then you can use that array to update a volume node. See examples in the script repository.

However, in general, I would recommend to acquire images, tracking data, and other sensor data in a separate process and stream it into Slicer using Plus toolkit. This provides more flexibility in what devices you can use and where the data is acuired; and makes the application more responsive (as image acquisition does not block the main thread of the GUI application).

1 Like