# Osteotomy Planner v2.0

**URL:** <https://discourse.slicer.org/t/osteotomy-planner-v2-0/18384>\
**Category:** Support\
**Tags:** build, python, surgical-planning\
**Created:** [June 29, 2021, 2:27am UTC](https://discourse.slicer.org/t/osteotomy-planner-v2-0/18384 "2021-06-29T02:27:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [July 4, 2021, 2:03pm UTC](https://discourse.slicer.org/t/osteotomy-planner-v2-0/18384/2 "2021-07-04T14:03:03Z")

</div>

Hello,

I wanted to come back to this in case anyone was interested into **craniosynostosis planning**. Hopefully someone will find this useful!

My original goal was to re-create the workflow presented by [García-Mato et al.](https://www.nature.com/articles/s41598-019-54148-4), but the **Kitware Osteotomy Planner** was not working as expected. Either way, I realized later that I _personally_ like using the **Transforms** module more than using the local transformations/interactions the **Kitware Osteotomy Planner** uses.

**Step-by-step:**

1. I used the **Dynamic Modeler** to _recreate the Osteotomies_ as indicated by the Surgeon. I mostly used **plane cuts** for the osteotomies.  

2. For _relative translations_ of the bone segments I used the **Transform** module.  

3. For _local rotations_, I had to create my own **Axis of Rotation** or **Pivot Axis** by creating a vertical **Line** on the midsagittal plane and coincident with the anterior edge of the advanced orbital segments. To perform the actual rotation, I then used [this script](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#rotate-a-node-around-a-specified-line) from the Slicer doc.

 ![figure_anterior_view_orbital_rotation_about_midsaggital_axis](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/a/9a246b3792152642ca06c620d6c33b0ed5cd2df1.png)  
_Local Rotation of the Left Orbital Segments, Superior View_

1. I kept repeating steps (2-3) to recreate the motions and rotations indicated by the Surgeon. This required two additional pivot axes. We generated two different positions of the Bandeau, one more aggressive than the other.

 ![figure_bandeau_compariosn_duperior_view](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/5/d5d26cadfacc77206067188a56077fb276cab158.png)

1. **Experimental** : Finally, we overlaid the Bandeau onto the soft-tissue segmentations to **“see”** the degree of improvements on the orbits. Would be nice to do something with displacement maps! (working on this now, will update later)

 ![figure_soft_tissue_overlay.PNG](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/2/a2c81dc0880741423d2279f0aecfd59dc561bdf1.jpeg)

**Challenges moving forth:**

1. For every rotation I had to use the script from the doc. **Is there a more elegant way of indicating a local rotation on the Transforms module?** Is the solution to convert the script into a Python module/function that I just call every time? (instead of copying and pasting)

2. Is there a way of **“linking”** or **“creating dependencies”** on the transformations? My goal is to update the initial advancement (for instance) and allow for slicer to make all of the updates downstream, does that make sense?

3. Is there a way of using a **Displacement Map** generated from **Model to Model Distance** to then warp another model, say the soft tissue in step 5?

**Thank you!**

---

_[View the full topic](https://discourse.slicer.org/t/osteotomy-planner-v2-0/18384)._
