PlusToolkit / PlusLib

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

Data Loss verification #608

Closed JFDamasceno closed 4 years ago

JFDamasceno commented 5 years ago

Hi, I'm using plustoolkit to perform volume reconstructions of the ultrasound images obtained with my US machine using openigtlink protocol. I would like to verify if all the images captured are received in Plus. I'm using plus server launch to run the config file and slicer to visualize the volume, but i can't seem to find a way to know how many frames have been received by plus(i know how many are sent by the US). Is it possible to obtain the number of images used to reconstruct a volume in plus? Thanks in advance José Damasceno

adamrankin commented 5 years ago

You can use a virtual disc capture object to also record the stream.

http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceVirtualCapture.html

JFDamasceno commented 5 years ago

Thank you Adam! It solved this issue, but now i have another. Each time I start plus, the first 5 to 6 frames sent by the Ultrasound are not received. I haven't noticed any loss beyond that point. Is there a reason for this? My config file goes attached.

Final.zip

adamrankin commented 5 years ago

Try modifying the StartupDelaySec="1.0" parameter in the <DataCollection ...> tag to be 0.0.

JFDamasceno commented 5 years ago

Changing the delay didn't solve my issue. I'm also receiving this info message from time to time |INFO|703.399000|SERVER>timeToolTimeStampedUpdate failed for tool: TransducerToProbe with timestamp: <...> attached goes the log file

093019_180110_PlusLog.txt

adamrankin commented 5 years ago

Who is providing the OpenIGTLink server of the ultrasound?

JFDamasceno commented 5 years ago

Plus is running on an independent PC connecting as a client to the US machine (where the server is) through TCP/IP.

adamrankin commented 5 years ago

Right, I mean what software is running on the US machine that is providing the OpenIGTLink server?

JFDamasceno commented 5 years ago

I'm using propello 6.1.3 on an Ultrasonix Tablet.

adamrankin commented 5 years ago

What is your order of operations? Are you trying to start the US IGT server and the Plus client at exactly the same time?

adamrankin commented 5 years ago

Or, are you counting the number of frames sent as recorded by propello and comparing that to the number of frames received by Plus?

JFDamasceno commented 5 years ago

I'm counting the number of frames captured and sent by propello and then comparing to the number of frames received on plus. I noticed the frames that were missing were the first ones by comparing the transform messages.

adamrankin commented 5 years ago

Ok, thanks, I get it now. Let me do some thinking and investigating.

adamrankin commented 5 years ago

Are you able to build Plus in debug?

JFDamasceno commented 5 years ago

i'm using the release version PlusApp-2.8.0.20190621-Win64. But i can try to build the debug using cmake.

lassoan commented 5 years ago

For a few seconds you just start filling recording buffers to make sure that by the time we start recording data, all data streams have valid items that you can interpolate between. This is mainly controlled by StartupDelaySec but maybe LocalTimeOffsetSec values are taken into acccount, too.

Note that you don't need to use Propello (it's just a demo application anyway). Relevant features from Propello are integrated into SonixPortaVideo device so that you can acquire tracked slices and reconstruct 3D volumes from them dynamically.

See example configuration file here: http://perk-software.cs.queensu.ca/plus/doc/nightly/user/DeviceSonixVideo.html

Demo video: https://www.youtube.com/watch?v=KTz0nwAmeMo

JFDamasceno commented 5 years ago

So this means there is no way to recover those first 5 frames? What are the advantages of using the integrated sonixportavideo instead of using propello?

lassoan commented 5 years ago

Propello cannot reconstruct volume in real-time.

What would you like to achieve overall?

JFDamasceno commented 5 years ago

I'm using ultrasonixTablet and KUKA lbr med to build a TRUS/MRI-Guided prostate biopsy system. The approach i took so far was to reconstruct a volume with plus for each position of the manipulator until it aligned the needle to the region of interest.

lassoan commented 5 years ago

That's exactly the kind of task the SonixPortaVideo device was developed for. It acquires tracked frames directly from the images and motor positions that ultrasonix porta interface provides. Plus volume reconstructor can create volumes in real-time from this information. If you track the robot's end effector position then you can take that into account in the volume reconstruction, too (you can reconstruct volumes in patient coordinate system and not just in the transducer coordinate system).

JFDamasceno commented 5 years ago

Thank you! That is really useful for me. I was reading about the compatibility of the sonix video with the SDK 6.1.3 and exam 6.1.0 that i have. From what i understood, it works with Porta or ulterius, and if i use ulterius i can run plus on a different machine. Does this ulterius setup works if my license for the exam software has expired? If it doesn't work the solution is to run porta interface on the US machine right?

lassoan commented 5 years ago

Ulterius cannot control motor or access motor coordinates.

Ulterius works when the Exam software is running while Porta requires that the Exam software is not running.

Ulterius can connect via network but that does not matter much, as Plus can run on the ultrasound machine and offers remote access to the data stream anyway.

I'm not sure about the impact of expired license.

JFDamasceno commented 5 years ago

Ok now i understood. I will try to run plus on the US machine then. Thank you!