# how to do surgical simulation with slicerIGT

**URL:** <https://discourse.slicer.org/t/how-to-do-surgical-simulation-with-slicerigt/16906>\
**Category:** Support\
**Created:** [April 1, 2021, 1:09pm UTC](https://discourse.slicer.org/t/how-to-do-surgical-simulation-with-slicerigt/16906 "2021-04-01T13:09:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sophie\_Legendri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sophie_legendri/32/10499_2.png) [@Sophie\_Legendri](https://discourse.slicer.org/u/Sophie_Legendri)\
**Post date:** [April 1, 2021, 1:09pm UTC](https://discourse.slicer.org/t/how-to-do-surgical-simulation-with-slicerigt/16906/1 "2021-04-01T13:09:42Z")

</div>

Operating system: OLEA  
Slicer version: 4.11.202009  
Expected behavior:  
Actual behavior:

Hello,  
I’m an OBGYN resident, and i’m a beginner with slicer (it’s been a few month since i’m using this great software), i’m working on a medical project of surgical planning, and i would like to know how can i add a stylus in my surgical scene for simulation (to see the entry point). Is it a way to do it directly or with Python code? I load the IGT slicer extension but i don’t really understand how to use it?  
I would need some help to do it.  
Regards,  
Sophie

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 1, 2021, 6:04pm UTC](https://discourse.slicer.org/t/how-to-do-surgical-simulation-with-slicerigt/16906/2 "2021-04-01T18:04:41Z")

</div>

That’s sounds like a great idea. Did you read through the tutorials on SlicerIGT’s web page?

[http://www.slicerigt.org/wp/](http://www.slicerigt.org/wp/)

---

<div class="post-metadata">

**Author:** ![Sophie\_Legendri](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sophie_legendri/32/10499_2.png) [@Sophie\_Legendri](https://discourse.slicer.org/u/Sophie_Legendri)\
**Post date:** [April 8, 2021, 2:21pm UTC](https://discourse.slicer.org/t/how-to-do-surgical-simulation-with-slicerigt/16906/3 "2021-04-08T14:21:03Z")

</div>

Hello Steeve,  
Thank you for your answer. Actually, i’m trying to do surgical planning but not in real time, i would like to had a device in my 3D reconstruction scene and see differents path for the “endoscope”. Is it possible to had a stylus or other device responding to my mouse movements permitting to see hypothetics paths?

Best regards,  
Sophie

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 9, 2021, 6:28pm UTC](https://discourse.slicer.org/t/how-to-do-surgical-simulation-with-slicerigt/16906/4 "2021-04-09T18:28:21Z")

</div>

Hi Sophie -

From the Slicer point of view, at some level we treat motions that come from trackers the same as motions that come from a mouse. Both are used to control Transforms, that can be used to manipulate objects in the scene. These objects might be simulated instruments or scopes. So I think SlicerIGT is a good place to get a sense of what’s possible, but you can ignore the details of connecting a physical tracker.

HTH,  
Steve

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [April 10, 2021, 4:40am UTC](https://discourse.slicer.org/t/how-to-do-surgical-simulation-with-slicerigt/16906/5 "2021-04-10T04:40:12Z")

</div>

You can import an STL model or generate models using “Create Models” module in SlicerIGT extension, then [move it around using a transform](https://slicer.readthedocs.io/en/latest/user_guide/modules/transforms.html#apply-transform-to-a-node). You can use “Volume Reslice Driver” module to reslice the image along the tool axes to verify that the trajectory is feasible and safe. You may also use PathExplorer module to simulate a tool trajectory.

You may also find [PortPlacement extension](https://www.slicer.org/wiki/Documentation/Nightly/Modules/PortPlacement) and [PercutaneousApproachAnalysis](https://www.slicer.org/wiki/Documentation/Nightly/Extensions/PercutaneousApproachAnalysis) extensions relevant. PortPlacement extension had a build error that I’ve pushed a fix for, we’ll see tomorrow if the fix worked. PercutaneousApproachAnalysis needs some updates for Python3.
