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

problem with fCal calibration #917

Open javan-del opened 2 years ago

javan-del commented 2 years ago

Hello,

I am a new user of 3d Slicer and Plus and I want to do the volume reconstruction. As I understand, first, I should do the “tracked ultrasound calibration”. Therefore, now I am trying to calibrate the Clarius ultrasound probe with a tracker device (OptiTrack).

1.I am able to do the “Pivot calibration” By using SlicerIGT Tutorial U_11 or using fCal.exe from “PlusApp-2.9.0.20220210-Clarius-Win64”. 2 . After that I wanted to do the temporal calibration using fCal.exe. I used “PlusApp-2.9.0.20220210-Clarius-Win64”. I created a fCal configuration file. However, when I try to open “Temporal calibration” fCal crashes and exits. 3 . Also, I tried to use fCal.exe from “PlusApp-2.9.0.20220304-Clarius-Win64”. However, with this version I am not even able to do the “Pivot calibration” it shows “Stylus calibration configuration is missing!” and shows below errors:

|ERROR|036.537000| Unable to find required vtkIGSIOPivotCalibrationAlgo element in device set configuration| in E:\D\PTNPCb\IGSIO\IGSIOCalibration\vtkIGSIOPivotCalibrationAlgo.cxx(286) |ERROR|036.537000| Reading pivot calibration algorithm configuration failed!| in E:\D\PTNPCb\PlusApp\fCal\Toolboxes\QStylusCalibrationToolbox.cxx(68)

For “Temporal calibration” in this version it also crashes when I click on “Temporal calibration”.

Can you please help me in this regard? Thank you.

Sunderlandkyl commented 2 years ago

The 2nd error should be fixed in tomorrow's package. (https://github.com/PlusToolkit/PlusApp/commit/9064af05faa806365013faa6ab1bedbdab21ca14)

I'm compiling a new build to test the crash. Can you upload your config file?

javan-del commented 2 years ago

Thank you so much. Yes, this is the config file.

PlusDeviceSet_fCal_Sim_TemporalCalibration - Clarius.txt

In the config file apart from StylusTip to Stylus Transform (which I computed), other matrices are the matrices in the example file. I also wanted to ask is it required to change them?

javan-del commented 2 years ago

Hello, Thank you for fixing pivot calibration. It is working now and is there any update on the temporal calibration crash issue?

Sunderlandkyl commented 2 years ago

I can't replicate the crash with temporal calibration. Can you confirm if it works when you load the recorded temporal simulation that comes with fCal?

javan-del commented 2 years ago

Yes, when I load "PlusDeviceSet_fCal_Sim_TemporalCalibration.xml" it works. However, when I loaded my config file (for the Clarius device) and I wanted to open Temporal calibration it crashed.

javan-del commented 2 years ago

Hello,

After a while of checking and changing parameters in the config file for temporal calibration, I figure out that when I set the “PortUsImageOrientation” to “FM” I am able to open the Temporal Calibration tab without a crash. However, when I open Temporal Calibration in fCal.exe, I get the below errors: |ERROR|046.232000| vtkIGSIOTrackedFrameList::VerifyProperties failed: expected image orientation is MFA, actual orientation is FM| in E:\D\PTNPCb\IGSIO\IGSIOCommon\vtkIGSIOTrackedFrameList.cxx(952) |ERROR|046.232000| vtkPlusLineSegmentationAlgo video input data verification failed: video data orientation or type is not supported (MF orientation, BRIGHTNESS type is expected)| in E:\D\PTNPCb\PlusLib\src\PlusCalibration\vtkLineSegmentationAlgo\vtkPlusLineSegmentationAlgo.cxx(134)

I appreciate it if you can help to solve this issue.

javan-del commented 2 years ago

Hello @Sunderlandkyl,

Would you please let me know if there is any way to solve this issue? Thank you.

Sunderlandkyl commented 2 years ago

Can you set the log level to Trace in fCal and attach a log file from the crash?

javan-del commented 2 years ago

Yes, this is the log file when PortUsImageOrientation="MF" and the crash happens. 041122_124820_PlusLog.txt

Below is the log file when PortUsImageOrientation="FM" and I get errors. 041122_123306_PlusLog.txt

Sunderlandkyl commented 2 years ago

The first log doesn't seem to provide info into the cause of the crash. Do you have experience in compiling a debug build to test where the crash occurs? Otherwise I'll see if I can get access to a Clarius or find someone with a debug build.

javan-del commented 2 years ago

Hello @Sunderlandkyl , Thank you for your response. Unfortunately no, I don't have experience in that. I really appreciate it if you can help in this regard.

javan-del commented 2 years ago

Hello, Is there any update about this issue? Thanks in advance.

javan-del commented 2 years ago

Hello @Sunderlandkyl, Is there any update about this issue? I tried to do the temporal calibration with the new version of plus "PlusApp-2.9.0.20220512-Clarius-Win64.exe". However, I still face the issue and cannot do the temporal calibration. I would really appreciate it if you could help to solve this issue. Thank you.

Sunderlandkyl commented 2 years ago

I'll have access to the device again soon. I'll take a look at it then.

javan-del commented 2 years ago

I really appreciate it. I am looking forward to hearing from you.

Sunderlandkyl commented 2 years ago

I've managed to reproduce the crash. Looking into it.

javan-del commented 2 years ago

Thank you so much. There was also another issue with regards to displaying RGBA volumes in the 3D view that I mentioned before in issue #902. That seems to require modification of the Clarius to send images as grayscale or RGB instead. I was wondering can this issue(Temporal calibration crash) be related to that as well?

Sunderlandkyl commented 2 years ago

Yes actually, it looks like it's due to the fact that the image is not grayscale.

javan-del commented 2 years ago

Thank you so much. Could you please let me know when it will be updated?