Import position data (tracking) for images

Hi everybody,

I am Matthieu working on a 3D free-hand project involving ultrasound imaging and electromagnetic device. I am interested to use 3D Slicer for volume visualization instead of Matlab. I am also thinking that the toolbox SlicerIGT can be the solution to generate a volume of my acquisition data without using Matlab however I do not know/did not find the way to do it.

I am using a research scanner (Verasonics Vantage system) acquiring at a high frame rate (100 Hz) where we save all the frames and later on generate a dataset, see above an image of our dataset:

During the acquisition, we also save the position of the probe using a Polhemus electromagnetic device at 240 Hz. All positions are saved in a text file (see above) with [Source number / Tracker number / Frame number / 00 / Time Stamp / X / Y / Z / Azimuthal / Elevation / Rho] :
1 1 000000004 00 1625573624860503 15.113 -6.832 7.757 10.525 -49.260 65.391
1 2 000000004 00 1625573624860503 12.144 10.723 8.686 -50.461 -0.218 30.956
1 1 000000005 00 1625573624864646 15.113 -6.832 7.757 10.524 -49.260 65.392
1 2 000000005 00 1625573624864646 12.144 10.723 8.686 -50.461 -0.218 30.956

We use Matlab and some of our script to register all the frames with the tracking position and generate a volume:

But Matlab is not really great for 3D Visualization, so we export our volume from Matlab as a lot of images and import them in 3D Slicer where we also do some segmentation

It works well but I would like to avoid passing by Matlab to generate the volume and directly generate it using Slicer3D.

I saw that SlicerIGT allow the streaming of video and trackers position in real time of certain equipment. However, in our case we do not want to do it in real-time but only as post-process. Is it possible to do it? I have checked about it but did not find anything.
I have also checked in 3DSlicer if it is possible to import our tracking position but either, I did not find anything.
If there is no such solution, do you know which format file I can use to provide a tracking position for each of our images and then provide them to 3DSlicer? I am also happy to do this way in order to generate a volume.

Thank you for your advice.

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.

Hi Andras,

Thank you for your reply.

I will have a look to save my dataset to the nrrd/mha file format. It was what I was thinking to do however I did not know which file format to use. Thanks !

I am not interested in the Real-Time display, we have to do further processing to combine several acquisitions together.

I will update the post when I succeed in everything and share how I did it.

1 Like

As mentioned above can Matlab get us real time data from the tracker and ultrasound machine, Iam pretty new at this so your help will be highly appreciated.