PlusToolkit / PlusLib

Software library for data acquisition, pre-processing, and calibration for navigated image-guided interventions.
http://www.plustoolkit.org
Other
133 stars 102 forks source link

Question: Element Spacing transform in saved sequence data #505

Closed jamesobutler closed 3 years ago

jamesobutler commented 5 years ago

These imaging devices add a field to each frame entry such as

Seq_Frame0000_ElementSpacing = 0.02567 0.02567 1

, but is this the correct way of saving element spacing for tracked image frames in PLUS? I don't see any other devices doing this. This would appear to be the preferred method since ElementSpacing in the standard metaimage header section is not used by PLUS. https://github.com/PlusToolkit/PlusLib/blob/f4e6e889ec6c04d0bd3bce5d4c49f5dc3446897e/src/PlusDataCollection/Capistrano/vtkPlusCapistranoVideoSource.cxx#L1104

https://github.com/PlusToolkit/PlusLib/blob/cf4c96895f7b6cf314805abdca3f80e77caa4f0a/src/PlusDataCollection/WinProbe/vtkPlusWinProbeVideoSource.cxx#L315

Currently, the "Seq_Frame0000_ElementSpacing" per frame entries I have aren't read by the Slicer Sequences extension. Should these Plus devices actually be putting this element spacing information in a transform like the tracker device does?

I use a virtual mixer device to pair a tracker device(USDigitalEncoderTracker) with the ultrasound image data. This includes the translational information(RS position) in a transform which correctly gets read by the Slicer Sequences extension and loaded as a transform node which I then apply to the loaded sequence metafile.

Seq_Frame0000_WEncodersToReferenceTransform = 1 0 0 -8.8366264 0 1 0 0 0 0 1 -28.5766224 0 0 0 1
Seq_Frame0000_WEncodersToReferenceTransformStatus = OK
jamesobutler commented 5 years ago

I see now that vtkPlusUSDevice is creating something that I think I'm looking for(transform of pixel spacing). I don't believe this is new, but I don't see this custom field entry for each of my frames. https://github.com/PlusToolkit/PlusLib/blob/2503fe99eb875a5cc9bc9eac9d6b262df9b05fdb/src/PlusDataCollection/vtkPlusUsDevice.cxx#L275-L287

lassoan commented 3 years ago

We are moving questions and discussions from the issue tracker to https://github.com/PlusToolkit/PlusLib/discussions. If you have remaining questions related to this topic, create a new discussion there. Thank you!