# Automate Dental Splint Generation using MarkerToModel Module

**URL:** <https://discourse.slicer.org/t/automate-dental-splint-generation-using-markertomodel-module/19980>\
**Category:** Support\
**Created:** [October 3, 2021, 10:50pm UTC](https://discourse.slicer.org/t/automate-dental-splint-generation-using-markertomodel-module/19980 "2021-10-03T22:50:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fluvio\_Lobo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fluvio_lobo/32/81262_2.png) [@Fluvio\_Lobo](https://discourse.slicer.org/u/Fluvio_Lobo)\
**Post date:** [October 3, 2021, 10:50pm UTC](https://discourse.slicer.org/t/automate-dental-splint-generation-using-markertomodel-module/19980/1 "2021-10-03T22:50:28Z")

</div>

Hello,

I am using **Fiducials** and the **MarkupToModel** module to generate an orthognathic splint from the position of the upper and lower dental landmarks in both the intermediate and final occlusions. I am getting pretty good results and would like to explore automating the process through Python scripting.

 ![slicer_splint_2](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/3/d3c6e8c8971ec9b5c70b5d3a2055fb500efe616c.jpeg)

Currently, _I start by combining upper and lower dental landmarks_ in a single **Fiducial List** ;

 ![dental_landmarks](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/9/f9ce2a8aea07fbe321c5193f8180ce2ccebe1d57.jpeg)  
_Figure: Dental landmarks in green, only the lower teeth are shown_

Using the **Fiducial List** as an Input to the **MarkupToModel** module, I create a “tube” using the parameters shown on the screenshot below.

 ![markup_to_model_screenshot.PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/0/202c611f1638119ed4f874b379b14b22079f397c.jpeg)

**Is there a way to interact with the MarkupToModel module programmatically using Python?** I briefly scanned the GitHub repo. and only found C++ code… Essentially, I just want to apply the parameters to every case.

---

<div class="post-metadata">

**Author:** ![Fluvio\_Lobo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fluvio_lobo/32/81262_2.png) [@Fluvio\_Lobo](https://discourse.slicer.org/u/Fluvio_Lobo)\
**Post date:** [October 4, 2021, 3:14am UTC](https://discourse.slicer.org/t/automate-dental-splint-generation-using-markertomodel-module/19980/2 "2021-10-04T03:14:07Z")

</div>

I did not know how to interact with `loadable modules` until I found [this post](https://discourse.slicer.org/t/create-axes-model-using-createmodels-cli/674/2).  
To replicate the parameters above, I just need to use the logic;

```auto
logic = slicer.modules.markerstomodel.logic()
logic.UpdateOutputCurveModel(fidNode,modelNode,3,False,4,8,5,True,1,1,slicer.vtkCurveGenerator(),1,0.5,3)

```

 ![automated_splint](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/c/8cfa4c2276ed6cf729baebd9ab75d902f17dc72e.jpeg)

---

<div class="post-metadata">

**Author:** ![manjula](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/manjula/32/80981_2.png) [@manjula](https://discourse.slicer.org/u/manjula)\
**Post date:** [September 14, 2023, 3:03pm UTC](https://discourse.slicer.org/t/automate-dental-splint-generation-using-markertomodel-module/19980/3 "2023-09-14T15:03:23Z")

</div>

Hi @Fluvio_Lobo ,

Can you please explain how you do this ? how do you make the thickness and how do you substract the occlusion ? do you use the model to substract the teeth from the tube or ?

if you can let me know your work flow it would be great.

thank you
