SlicerIGT tutorial

Hi, I’m a very beginner of 3dslicer and slicerIGT,
and I would like to connect my webcam to 3dslicer by using slicerigt









I’ve changed CaptureDeviceID, Framesize, Videoformat, also port, but still ‘connection failed’ message comes out.

How can I solve this?
(I’ve prepared OpticalMarkerTracker/realsense_gen2_calibration.yml as well)
is there any video lecture for this connection?

Can you attach a log file?

how can I find a log file from plustoolkit?

It will be in the data folder in your Plus install directory.

time|level|timeoffset|message|location
101724_235305.665|INFO|000.001000| System start timestamp: 719845| in E:\D\PSNP64b\PlusLib\src\PlusCommon\vtkPlusAccurateTimer.cxx(51)
101724_235305.667|INFO|000.003000| Software version: Plus-2.8.0.62873a16 - Win64| in vtkPlusLogger(188)
101724_235305.667|INFO|000.003000| Logging at level 3 (INFO) to file: C:/Users/tjmds/PlusApp-2.8.0.20191105-Win64/data/101724_235305_PlusLog.txt| in E:\D\PSNP64b\PlusLib\src\PlusServer\Tools\PlusServer.cxx(81)
101724_235305.670|INFO|000.005000| Selected US image orientation: MF| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\vtkPlusDataSource.cxx(301)
101724_235305.687|INFO|000.023000| Server status: Reading configuration.| in E:\D\PSNP64b\PlusLib\src\PlusServer\Tools\PlusServer.cxx(92)
101724_235305.687|INFO|000.023000| Server status: Connecting to devices.| in E:\D\PSNP64b\PlusLib\src\PlusServer\Tools\PlusServer.cxx(103)
101724_235305.720|WARNING|000.055000|> Unable to init capture device with requested details: device ID: 0 (Camera Sensor OV02C10) stream 0, 1920x1080, 30Hz, MJPG| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(313)
101724_235305.720|INFO|000.056000|> Supported vide formats for Device Id 0 (Camera Sensor OV02C10)| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(680)
101724_235305.720|INFO|000.056000|> Stream index 0 - Frame size: 1920x1080, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.720|INFO|000.056000|> Stream index 0 - Frame size: 1280x720, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.720|INFO|000.056000|> Stream index 0 - Frame size: 640x360, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.720|INFO|000.056000|> Stream index 0 - Frame size: 640x480, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.720|INFO|000.056000|> Stream index 0 - Frame size: 960x540, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.720|ERROR|000.056000|> Unable to initialize capture device with default details: device ID: 0 (Camera Sensor OV02C10) stream 0, 640x480, 30Hz, YUY2| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(319)
101724_235305.720|INFO|000.056000| Found capture devices:| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(692)
101724_235305.721|INFO|000.057000|> 0: Camera Sensor OV02C10| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(698)
101724_235305.721|INFO|000.057000|> Supported vide formats for Device Id 0 (Camera Sensor OV02C10)| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(680)
101724_235305.721|INFO|000.057000|> Stream index 0 - Frame size: 1920x1080, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.721|INFO|000.057000|> Stream index 0 - Frame size: 1280x720, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.721|INFO|000.057000|> Stream index 0 - Frame size: 640x360, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.721|INFO|000.057000|> Stream index 0 - Frame size: 640x480, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.721|INFO|000.057000|> Stream index 0 - Frame size: 960x540, video format: NV12, frame rate: 30| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\MicrosoftMediaFoundation\vtkPlusMmfVideoSource.cxx(685)
101724_235305.721|ERROR|000.057000| VideoDevice: Cannot connect to data source, ConnectInternal failed| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\vtkPlusDevice.cxx(1147)
101724_235305.721|ERROR|000.057000| Unable to connect device: VideoDevice.| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\vtkPlusDataCollector.cxx(353)
101724_235305.723|INFO|000.058000| Use aruco camera calibration file located at: C:/Users/tjmds/PlusApp-2.8.0.20191105-Win64/config/OpticalMarkerTracker/realsense_gen2_calibration.yml| in E:\D\PSNP64b\PlusLib\src\PlusDataCollection\OpticalMarkerTracking\vtkPlusOpticalMarkerTracker.cxx(236)
101724_235305.723|ERROR|000.059000| Datacollector failed to connect to devices| in E:\D\PSNP64b\PlusLib\src\PlusServer\Tools\PlusServer.cxx(106)

The log file lists the supported video streams configurations from your camera.

The only video format from the camera seems to be NV12, which is not currently a supported format in Plus.

1 Like

Hello,

I don’t understand the log file, but I would recommend that you first test your webcam using a configuration file specifically for the webcam without including the markers. If you can successfully connect to the Plus server and see the camera in 3D Slicer, then you can go back to your main configuration file.

Remember, when you run the main configuration file, if your webcam doesn’t see even one of the markers, you will receive an error indicating that it is not successfully connected. I have attached a configuration file for you to check your webcam first.

1 Like

Thanks to your advice, the connection issue has been resolved, and I can confirm that the status in OpenIGTlinkIF is ‘on’!(I’ve set Videoformat from YUY2 to NV12 and solved → Perhaps Plus support NV12 currently?)

What I want to do next is to align the object and the marker, as shown in this video: Aligning Object and Marker. What steps should I follow next?

Interesting, I didn’t think that NV12 would work.

You can load the OpticalMarkerTracker_Scene.mrb from the “config” folder in your Plus install.

Can I get more detail of it?
in the config\OpticalMarkerTracker folder, I already have OpticalMarkerTracker_Scene.mrb file

How can I turn on Camera from the scene in the 3d slicer?
Also how to align my marker with stl file?
So many questions haha

I hope you can dedicate some time to check my status remotely. How did you study, Where and what did you study? Can you spare some time? If so, I will do my best to accommodate the time you suggest.

In the Marker coordinate system, the origin of the marker is at the center of the marker, and the XY axis lie perpendicular with the marker plane. Transforming a square on the XY plane using the MarkerNToTracker transform should be positioned correctly.

For more complex models, you will have to perform a stylus calibration and then a landmark registration.

Have you worked through the tutorials from www.slicerigt.org?
SlicerIGT Tutorials

They should help walk you through the process of stylus calibration and landmark registration using Slicer and Plus.

1 Like