# python version of the Frenet frame

**URL:** https://discourse.vtk.org/t/python-version-of-the-frenet-frame/2747
**Category:** Development
**Created:** [March 3, 2020, 6:28pm UTC](https://discourse.vtk.org/t/python-version-of-the-frenet-frame/2747 "2020-03-03T18:28:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Olicr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/e19b73/32.png) [@Olicr](https://discourse.vtk.org/u/Olicr)
#### Post date: [March 3, 2020, 6:28pm UTC](https://discourse.vtk.org/t/python-version-of-the-frenet-frame/2747/1 "2020-03-03T18:28:13Z")

</div>

Dear VTK experts,

I know there is a C++ implementation of the Frenet frame and a demo is available in the following link:

[https://cmake.org/Wiki/VTK/Examples/Cxx/Remote/FrenetSerretFrame](https://cmake.org/Wiki/VTK/Examples/Cxx/Remote/FrenetSerretFrame)

But I can’t seem to find a version implemented in python.

I would like to use it for a personal project and would like to know if I should implement it on my own or if I can use an already existing implementation.

Looking forward to read your answers,

Best regards,

OC.

---

<div class="post-metadata">

### Author: ![Olicr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/e19b73/32.png) [@Olicr](https://discourse.vtk.org/u/Olicr)
#### Post date: [March 3, 2020, 6:29pm UTC](https://discourse.vtk.org/t/python-version-of-the-frenet-frame/2747/2 "2020-03-03T18:29:46Z")

</div>

I should add I have spent some time looking for it online.

OC

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [March 3, 2020, 6:56pm UTC](https://discourse.vtk.org/t/python-version-of-the-frenet-frame/2747/3 "2020-03-03T18:56:47Z")

</div>

I don’t see a Python version, but the transformation from C++ is pretty straightforward.

---

<div class="post-metadata">

### Author: ![Olicr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/e19b73/32.png) [@Olicr](https://discourse.vtk.org/u/Olicr)
#### Post date: [March 3, 2020, 6:59pm UTC](https://discourse.vtk.org/t/python-version-of-the-frenet-frame/2747/4 "2020-03-03T18:59:34Z")

</div>

Dear Cory Quammen,

Alright, thank you for your prompt reply.

Best regards,

OC

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [March 3, 2020, 9:20pm UTC](https://discourse.vtk.org/t/python-version-of-the-frenet-frame/2747/5 "2020-03-03T21:20:13Z")

</div>

The math is trivial, indeed, but just in case you don’t want to spend time with reimplementing it in Python (or performance is critical), you can access the Python-wrapped vtkFrenetSerretFrame and vtkSplineDrivenImageSlicer classes in the Python distribution bundled with 3D Slicer (recent Slicer Preview Releases). In Slicer you can also display and interactively edit curves, generate curved planar reformatted volumes (e.g., panoramic X-ray from CBCT), straighten volumes, etc. See some more information in [this post](https://discourse.slicer.org/t/how-to-implement-cpr-curved-plannar-reconstruction-from-centerline/9456/3?u=lassoan)

---

<div class="post-metadata">

### Author: ![Olicr](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/e19b73/32.png) [@Olicr](https://discourse.vtk.org/u/Olicr)
#### Post date: [March 4, 2020, 6:52pm UTC](https://discourse.vtk.org/t/python-version-of-the-frenet-frame/2747/6 "2020-03-04T18:52:36Z")

</div>

Dear Andras Lasso,

Thank you for your feedback.

Best regards,

OC
