Open Marinho95 opened 3 years ago
If you set the log level to trace, can you see if ProcessedImageCallback is being called?
Yes, it is being called. I added the trace log file in the attachment. Maybe that helps in finding the problem?
I just added a commit (fbb91a4) can you try it now?
Thanks! I don't have the Clarius device right now, but I will try it tomorrow!
I used the new files, but I still get the same error. I added the log file in the attachment.
When pressing 'stop server' in Plusserverlauncher, the disconnect is succesful, but the following message appears:
|DEBUG|106.748000| vtkIGSIOTransformRepository::ReadConfiguration: no CoordinateDefinitions element was found| in C:\D\PlusB-bin\IGSIO\Source\IGSIOCommon\vtkIGSIOTransformRepository.cxx(627)
Could this be connected to the problem? What would be the problem otherwise?
I'm sorry, but it worked! I forgot to rebuild Plus after copying the new .cxx file. I'm still a total noob on this field. XD
Thank you so much for your help!
So far, Plusserver works and I can send the Clarius images to Slicer. However, I couldn't visualize the image in 3D and save the sequence of the collected images in Slicer. I found out that the image that is sent by Plusserver is loaded as a VectorVolume in Slicer, which limits further application. Is it possible to load the images as a Volume instead of a VectorVolume?
That would require colour conversion to be performed by Plus before sending to Slicer, which is do-able.
Alright, that would be very nice! How to do that?
Hi, do you have time to fix this? Or should I look for another solution?
Let me see what is involved, I'll get back to you shortly.
@lassoan @Sunderlandkyl Do you guys have any documentation for the API? I can't find any info as to what types of images (color? RGB? RGBA? BGR, etc...) are returned by the listen API.
There's some documentation on the Clarius API here: https://github.com/clariusdev/listener. I remember seeing a more in-depth manual at some point. I'll let you know if I find it.
@Marinho95 I do recommend you keep investigating why you're unable to accomplish those things with vector volumes. As far as I know, it should work.
I think the problem is that some Slicer modules only work with scalar volumes, for example, the volume rendering module. So when visualizing the vector image in the 3D view in Slicer, I only see a black image without the ultrasound image. After using the vector to scalar volume module on the image, it worked. However, this module is a static conversion. Could it be possible to convert the images using this module in real-time?
Ah, I see.
No I don't think that module does real-time conversion. I'll make some additions to Plus so that it can send greyscale. @Sunderlandkyl do you guys have a clarius to test with?
Yes, although I don't have access to it right now. I can ask the person who has it to test the changes.
You can add an observer to a volume node and copy a grayscale version automatically, but since this conversion would be done on the main thread and transferring RGB/A image takes 3-4x more bandwidth, it makes more sense to convert to grayscale in Plus, before transferring to Slicer.
Ok, I'll need to know what kind of images are returned by the Clarius by default (RGB/BGR etc..?).
I don't know what is returned by default, but I have the Plusbuild with Clarius support on my computer. How could I find this information for you?
In addition, do you know if the color images of the Clarius doppler mode could be converted to scalar images as well? Or would the color data be lost after that conversion?
Vector image means color, scalar image means grayscale. All doppler color information will be lost.
Yes, exactly. It would be nice to keep the color doppler data.
So the only problem right now is that the vector image of the ultrasound appears normal in the red slice, but doesn't appear in the 3D view. See image:
Is there another solution to show the vector ultrasound image in the 3D view? Or might it be possible to only convert B-mode (without doppler) vector images to scalar images?
Thanks for your help
I'm not sure what's going on in the slice view. have you filed a bug report with slicer?
RGBA images in slice views not rendered in 3D views is a known issue in Slicer - see https://github.com/Slicer/Slicer/issues/4939. Sending grayscale or RGB images from Plus will solve this issue.
Thanks for your clarification!
So, the Clarius device sends RGBA images. Since I would like to use color doppler data as well, RGB images are preferred over grayscale images. Is it possible for you to make adjustments to Plus, so it sends RGB images instead of RGBA images?
Yes, I have made the code changes, but I want to ensure that they're correct. I'll see if I can get ahold of our Clarius scanner.
After some work, I managed to build Plus myself including the newest version of the Clarius API (version 7.1.0). Afterwards, I used the plusserverlauncher to connect to the Clarius device. I used the config file that was provided and set the correct IP address and port number. I also used the same local Wi-Fi network to connect to the Clarius device with the mobile app and on the windows computer where Plus was running. Now, the connection through Plus went fine and the server was running. However, the following 2 warnings appeared for every image in the Pluslog:
Raw image was received, however no output RF video source was found. Processed image was received, however no output B-Mode video source was found.
When connecting the Igtlink to Slicer, no data was received and the following message appeared in the Pluslog: No data is broadcasted, as no data is available yet.
I looked up the warnings in the vtkPlusClarius.cxx file, but I couldn't figure out what the problem was. Do you have any idea?