Use of 'sequences' for 3D ultrasound spatial calibration and acquisition

Hi,

I am doing 3D ultrasound using an Optitrack motion capture system and an USB module streaming the video feed from a SuperShearingImaging ultrasound :

  • First, I use FCAL for the temporal and stylus calibrations
  • Then, I use PlusServer + 3D Slicer + SlicerIGT for the spatial calibration and for acquisitions.

To record my live acquisitions, I use the module ‘Sequences’.
I don’t quite understand how it works, and I feel that maybe I am missing some steps or missing a simpler way to do it :

  • I have the following hierarchy in ‘Data’:
    Picture1

  • For the recording of the spatial calibration, I create a calibration_spatial’ sequence, then add three nodes : Image_Image , ProbeToTracker , StylusToTracker.
    Picture2

  • I do not tick ‘rename’ and ‘save changes’ since if I do, I loose my live image of the ultrasound.

  • Then, I click record and I perform my calibration. I stop the recording

  • Finally, I tick ‘rename’ and ‘save changes’.

  • I go to the Fiducial Wizard, calculate my ImageToProbe matrix using the data from the sequence.

  • To go back to live visualisation, it is quite a pain : I have to uncheck the view of all the data from the calibration, check the view for all my ‘live’ data, and redo the hierarchy since the ‘live’ data has been relocated to the ‘Scene’ master.

  • then I redo the hierarchy using ‘ImageToProbe’ in order to visualise my ultrasound image in the 3D view.

  • To do an acquisition of a volume, I go to ‘Sequences’, add two nodes ‘Image_Image’ and ‘ProbeToTracker’, I do not check ‘rename’ and ‘save changes’, do my recording, stop the recording, and finally check ‘rename’ and ‘save changes’.

  • Then again, if I want to go back to my ‘live’ images, I need to set again the hierarchy.

Am I doing this the right way ? Is there a simpler way to switch between ‘live’ and a recorded sequence ?
Why the hierarchy is reset each time I record a sequence ?

Thanks in advance,
Cheers
Aurélie

I think you can do things in a much simpler way.

Rename just changes the node name to include timestamp. It does not affect visibility.

Save changes means that if you make changes to a recorded frame then it is saved in the sequ nce. This does not affect visibility either.

Can you take a screen capture video that shows how the image disappears for you?

This is not necessary. Actually, it makes things simpler if you keep them disabled because then you can use the same transform hierarchy for record and replay.

This is not necessary. OpenIGTLink can update the same sequence proxy nodes. Just keep “Save changes” turned off to make sure you don’t change any recorded data. [quote=“AurelieS, post:1, topic:13294”]
then I redo the hierarchy using ‘ImageToProbe’ in order to visualise my ultrasound image in the 3D view
[/quote]

Not necessary. The same node hierarchy can be used by live display and replay. [quote=“AurelieS, post:1, topic:13294”]
To do an acquisition of a volume, I go to ‘Sequences’, add two nodes ‘Image_Image’ and ‘ProbeToTracker’, I do not check ‘rename’ and ‘save changes’, do my recording, stop the recording, and finally check ‘rename’ and ‘save changes’.
[/quote]

Not necessary. You can reconstruct a volume without recording it. [quote=“AurelieS, post:1, topic:13294”]
Then again, if I want to go back to my ‘live’ images, I need to set again the hierarchy.
[/quote]

Not necessary, as the same hierarchy can be used for record and replay.

What do you do when you record a sequence? Just click on record button? What exactly is being reset?

The thing is, if I do not check ‘Rename’ when I record a sequence, when I play back the sequence I just recorded, I feel like the software is trying to display both live images (from the trackers and the ultrasound) and the recorded images, so the images are very messy, and I cannot put my fiducials to do my spatial calibration for example. I feel that is logical since a same node, for example image_image, will then be used both for ‘live’ and for the recorded sequence.

When I check ‘Rename’, the software immediately creates a new node linked to the recorded with a timestamp between brackets []. So if I check ‘Rename’ before the recording, I loose the ‘live’ image and tracking :

But if I check ‘Rename’ after the recording, that is fine because this time I can see the recorded images when I replay a sequence, however the initial ‘live’ nodes are ejected from the transform hierarchy and the recorded nodes take their place as seen in theses pictures :



So when I need to go back ‘live’, I need to redo the hierarchy :

PS1 : when I record a sequence I just click the “record” button, then click again to stop the recording.
PS2 : I saw that I could do live reconstruction but I would like to record the volume reconstruction.

Thanks,
Aurélie

You can deactivate the OpenIGTLink connection if you want to work with recorded data, and activate the connection if you want to show live data.

@ungi What is your usual workflow?

If we find that common tasks are inconvenient to do then we can improve things (for example, add OpenIGTLink connection activate button on the toolbar or other modules GUI).

Several topics here…

As @lassoan said, you need to disable the OpenIGTLink connection (uncheck active) when playing back recorded sequences. A toolbar icon for OpenIGTLink activation switch sounds like a good idea, although I never really felt the need. A typical user is either recording or playing back data, but not switch rapidly between the two. I have never used the rename option in Sequences.

If you have a special use case e.g. you need to replay the recorded sequence immediately after the recording is stopped, then I recommend writing a small module just for your application. It shouldn’t take more than a few dozen lines of code. It could automatically deactivate the connection and replay the recorded sequence.

Volume reconstruction and recording works at the same time. Again, if you don’t want to start these two functions in two separate modules, then you need a small module that starts both when you press a button. Maybe more modules could implement their own toolbars, so users could add more functions to their personal toolbars for the functions they use. Maybe we could add this as part of the default module wizard to motivate more people. But that kind of change would take a long time.

You do need a different transform hierarchy for calibration. But calibration should not be done frequently. And it’s always a good idea to just record calibration data, save, and process it later offline. That way you will have your calibration image sequence archived. And precise calibration requires patience. It is easier when the live hardware is not running next to you.

1 Like

Thank you so much for your responses, it is very clear !
I did not think of activating / deactivating the OpenIGTLink connection, I will try this in my workflow.