# SlicerIGT tutorial

**URL:** <https://discourse.slicer.org/t/slicerigt-tutorial/39738>\
**Category:** Support\
**Tags:** slicerigt, openigtlink\
**Created:** [October 17, 2024, 3:28am UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738 "2024-10-17T03:28:19Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielGu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/danielgu/32/78246_2.png) [@DanielGu](https://discourse.slicer.org/u/DanielGu)\
**Post date:** [October 17, 2024, 3:28am UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/1 "2024-10-17T03:28:19Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/2/d2c157dfbb65f8a812e7fd0aa2c936cc4c4d44a7.png)

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [October 17, 2024, 2:50pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/2 "2024-10-17T14:50:17Z")

</div>

Can you attach a log file?

---

<div class="post-metadata">

**Author:** ![DanielGu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/danielgu/32/78246_2.png) [@DanielGu](https://discourse.slicer.org/u/DanielGu)\
**Post date:** [October 17, 2024, 2:51pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/3 "2024-10-17T14:51:02Z")

</div>

how can I find a log file from plustoolkit?

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [October 17, 2024, 2:52pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/4 "2024-10-17T14:52:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DanielGu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/danielgu/32/78246_2.png) [@DanielGu](https://discourse.slicer.org/u/DanielGu)\
**Post date:** [October 17, 2024, 2:53pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/5 "2024-10-17T14:53:21Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [October 17, 2024, 4:05pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/6 "2024-10-17T16:05:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MReza](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@MReza](https://discourse.slicer.org/u/MReza)\
**Post date:** [October 17, 2024, 4:06pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/7 "2024-10-17T16:06:50Z")

</div>

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.

 ![qq](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/9/f9eca5ec9227c07f1ab1a3cf77724cf05220f0cf.png)

---

<div class="post-metadata">

**Author:** ![DanielGu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/danielgu/32/78246_2.png) [@DanielGu](https://discourse.slicer.org/u/DanielGu)\
**Post date:** [October 18, 2024, 6:42am UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/8 "2024-10-18T06:42:53Z")

</div>

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](https://youtu.be/MOqh6wgOOYs?si=hZqHskpL6N3Ah9ey). What steps should I follow next?

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [October 18, 2024, 2:26pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/9 "2024-10-18T14:26:28Z")

</div>

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

You can load the OpticalMarkerTracker\_Scene.mrb from the “config” folder in your Plus install.

---

<div class="post-metadata">

**Author:** ![DanielGu](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/danielgu/32/78246_2.png) [@DanielGu](https://discourse.slicer.org/u/DanielGu)\
**Post date:** [October 18, 2024, 3:00pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/10 "2024-10-18T15:00:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [October 18, 2024, 3:15pm UTC](https://discourse.slicer.org/t/slicerigt-tutorial/39738/11 "2024-10-18T15:15:19Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/b/3bcbb4f7700835845a57646de47465962f2d8039.png)

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](http://www.slicerigt.org)?  
[SlicerIGT Tutorials](https://onedrive.live.com/?authkey=%21AGQkSCZOwjVYXw8&id=7230D4DEC6058018%212937&cid=7230D4DEC6058018)

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