Import position data (tracking) for images

If you want to keep Matlab for data acquisition then all you need to do is to save the image and tracking data in sequence nrrd/mha file format. You can then load that into Slicer and reconstruct the volume using the Volume Reconstructor module, similarly to this:

If you want to do real-time acquisition in Slicer then you need to set up an OpenIGTLink connection. We usually use Plus toolkit for this, but that does not support Verasonics ultrasound and Polhemus tracker, so instead you can keep using your Matlab code for acquiring the tracked image data and send the tracked image data to Slicer using by using pyigtl.