Importing of position-tracked ultrasound sequence

I have encountered another problem with importing “.seq.nrrd” sequence files. I have recorded a sequence file with the PLUS remote module via Slicer containing US and tracker data. When I try to import this directly into Slicer, it reads the volume voxel data but not the spacing / offset / tracking information stored with it.

Is there any way I can access the PLUS-stored data from the “.seq.nrrd” file directly from Slicer?

Many thanks for your help!

Plus saves the raw data (original transforms and uncalibrated image data) to sequence files, so you need to apply calibration as explained in SlicerIGT tutorials.

That is exactly what I was trying to do (import the PLUS raw data into Slicer to run the calibration). But for this it is necessary to read the volumes AND the original transforms from the .seq.nrrd file. I am not sure what I am doing wrong since only the volumes appear in the data module but not the corresponding transforms.

Do you have transforms in the .seq.nrrd file?
Have you installed Sequences extension?
Can you replay the sequence using sequence browser toolbar (play/pause/prev/next buttons)?

Yes to all of your questions. The .seq.nrrd file saved by PLUS contains a header like the example included below. In this case I have used the “FakeTracker” for simulation and as you can see the transforms are included in the PLUS file. When replaying this file via PLUS remote, the volumes and the transforms can be transferred to Slicer without problems. However, when I try to import the file directly into Slicer, only the volumes are imported with default spacing, zero offset and without the corresponding transforms. I can use the sequence browser to move through the volume sequence.

Any ideas what might be going wrong? Thanks for your help!

(Note that we have added a custom field for “ElementSpacing” according to what is sent from the US station but this should not have any effect on Slicer / PLUS).

NRRD0004

Complete NRRD file format specification at:

http://teem.sourceforge.net/nrrd/format.html

File generated by PLUS version 2.7.0

dimension: 4
encoding: raw
endian: little
kinds: domain domain domain list
sizes: 112 48 112 15
space dimension: 3
space directions: (1,0,0) (0,1,0) (0,0,1) none
space origin: (0,0,0)
type: uint8
ultrasound image orientation:=MFA
ultrasound image type:=BRIGHTNESS
Seq_Frame0000_ElementSpacing:=0.7827 0.9403 0.9229 1
Seq_Frame0000_ProbeToTrackerTransform:=0.9925461516413222 0 0.1218693434051475 0 0 1 0 300 -0.1218693434051475 0 0.9925461516413222 0 0 0 0 1
Seq_Frame0000_ProbeToTrackerTransformStatus:=OK
Seq_Frame0000_ReferenceToTrackerTransform:=1 0 0 0 0 1 0 150 0 0 1 200 0 0 0 1
Seq_Frame0000_ReferenceToTrackerTransformStatus:=OK
Seq_Frame0000_Stylus-2ToTrackerTransform:=1 0 0 0 0 0.9925461516413222 -0.1218693434051475 273.3899768113671 0 0.1218693434051475 0.9925461516413222 235.0700333498087 0 0 0 1
Seq_Frame0000_Stylus-2ToTrackerTransformStatus:=OK
Seq_Frame0000_Stylus-3ToTrackerTransform:=1 0 0 100 0 0.9925461516413222 -0.1218693434051475 300 0 0.1218693434051475 0.9925461516413222 0 0 0 0 1
Seq_Frame0000_Stylus-3ToTrackerTransformStatus:=OK
Seq_Frame0000_StylusToTrackerTransform:=0.9925461516413222 0 0.1218693434051475 0 0 1 0 300 -0.1218693434051475 0 0.9925461516413222 0 0 0 0 1
Seq_Frame0000_StylusToTrackerTransformStatus:=OK
Seq_Frame0000_Timestamp:=235.9266571427097
Seq_Frame0000_Status:=OK
Seq_Frame0001_ElementSpacing:=0.7827 0.9403 0.9229 1
Seq_Frame0001_ProbeToTrackerTransform:=0.9925461516413222 0 0.1218693434051475 0 0 1 0 300 -0.1218693434051475 0 0.9925461516413222 0 0 0 0 1
Seq_Frame0001_ProbeToTrackerTransformStatus:=OK
Seq_Frame0001_ReferenceToTrackerTransform:=1 0 0 0 0 1 0 150 0 0 1 200 0 0 0 1
Seq_Frame0001_ReferenceToTrackerTransformStatus:=OK
Seq_Frame0001_Stylus-2ToTrackerTransform:=1 0 0 0 0 0.9925461516413222 -0.1218693434051475 273.3899768113671 0 0.1218693434051475 0.9925461516413222 235.0700333498087 0 0 0 1
Seq_Frame0001_Stylus-2ToTrackerTransformStatus:=OK
Seq_Frame0001_Stylus-3ToTrackerTransform:=1 0 0 100 0 0.9925461516413222 -0.1218693434051475 300 0 0.1218693434051475 0.9925461516413222 0 0 0 0 1
Seq_Frame0001_Stylus-3ToTrackerTransformStatus:=OK
Seq_Frame0001_StylusToTrackerTransform:=0.9925461516413222 0 0.1218693434051475 0 0 1 0 300 -0.1218693434051475 0 0.9925461516413222 0 0 0 0 1
Seq_Frame0001_StylusToTrackerTransformStatus:=OK
Seq_Frame0001_Timestamp:=236.0600285712696
Seq_Frame0001_Status:=OK

Can you upload the sequence file and application log (menu: Help/Report a bug) to Dropbox/OneDrive/Gdrive and post the link here?

Sure, here are the sequence file, the config file I used for recording in PLUS and the Slicer log:
https://www.dropbox.com/s/8ld1r30l0affqxc/4DUS-Sequence.zip?dl=0

Thanks!

Thanks for the data. It seems that Sequences can only import tracked image data from seq.mha or seq.mhd files (and not from seq.nrrd or seq.nhdr). If you save the data in Plus as seq.mha then you can load it as “Sequence Metafile” instead of “Volume Sequence”.

I’m not sure if Plus can save 4D tracked ultrasound in seq.mha file. If that’s the case then submit a feature request at Plus library’s issue tracker.

I have tried to save the data in a .seq.mhd file via PLUS but when I try to import the file into Slicer as a Sequence Metafile it just crashes. Maybe you could have another look at the files?
https://www.dropbox.com/s/32he9eb4w0rcm4r/4DUS-Sequence-MHD.zip?dl=0

Do you reckon this is a problem with PLUS’ saving or Slicer’s importing?

Slicer should not crash when trying to import the sequence, so it is an issue in Sequences extension. Could you please submit a bug report for Sequences extension.

I submitted an issue for the Sequences extension (https://github.com/SlicerRt/Sequences/issues/52).
Looking forward to your reply!

1 Like

2 posts were split to a new topic: Visualize .igs.mha tracked ultrasound sequence in 3D