# 2D skeletonization?

**URL:** https://discourse.itk.org/t/2d-skeletonization/7268
**Category:** Algorithms
**Created:** [October 18, 2024, 8:02pm UTC](https://discourse.itk.org/t/2d-skeletonization/7268 "2024-10-18T20:02:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [October 18, 2024, 8:02pm UTC](https://discourse.itk.org/t/2d-skeletonization/7268/1 "2024-10-18T20:02:32Z")

</div>

Are there any algorithms for medial surface implemented in ITK? The [Thickness3D](https://github.com/InsightSoftwareConsortium/ITKThickness3D/) module only does 1D skeletonization, useful for vessels, airways, or maybe limbs.

There is a CLI module in Slicer called [ExtractSkeleton](https://github.com/Slicer/Slicer/tree/main/Modules/CLI/ExtractSkeleton), last time meaningfully refactored by @lassoan in 2021, which can do both 1D and 2D skeletonization of a 3D mask. If there is no existing ITK implementation of 2D skeletonization, it would make sense to refactor this CLI into an ITK remote module. Are there any opinions about this? @jhlegarreta @T4mmi @hjmjohnson @blowekamp @Niels_Dekker @matt.mccormick @jcfr

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)
#### Post date: [October 18, 2024, 9:37pm UTC](https://discourse.itk.org/t/2d-skeletonization/7268/2 "2024-10-18T21:37:14Z")

</div>

Since VMTK’s Voronoi surface extractor exists, we don’t use ExtractSkeleton module anymore. The Voronoi surface is a 2D surface represented as a mesh, which can store a medial surface in a much more robust and compact manner. VMTK can also find optimal path in the Voronoi surface, providing centerline (in case you need 1D tree extraction).

So, I would rather recommend to use VMTK for 2D skeletonization (i.e., medial surface extraction). You can also have a look at various tools in SlicerSALT and underlying libraries that can extract medial surface.

---

<div class="post-metadata">

### Author: ![jhlegarreta](https://discourse.itk.org/user_avatar/discourse.itk.org/jhlegarreta/32/476_2.png) [@jhlegarreta](https://discourse.itk.org/u/jhlegarreta)
#### Post date: [October 19, 2024, 7:53am UTC](https://discourse.itk.org/t/2d-skeletonization/7268/3 "2024-10-19T07:53:44Z")

</div>

Sorry @dzenanz, do not know enough about the possibilities to tell whether one possibility is better than the other. I am fine with whatever others say is most appropriate to dwell in a remote module. I would have a look at the remote module as time permits once it is in place.

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [October 21, 2024, 1:23pm UTC](https://discourse.itk.org/t/2d-skeletonization/7268/4 "2024-10-21T13:23:10Z")

</div>

@richard.beare Contributed a large number of morphological filters to ITK. He may have any an existing implementation someplace.

---

<div class="post-metadata">

### Author: ![richard.beare](https://discourse.itk.org/letter_avatar_proxy/v4/letter/r/ed655f/32.png) [@richard.beare](https://discourse.itk.org/u/richard.beare)
#### Post date: [October 21, 2024, 8:12pm UTC](https://discourse.itk.org/t/2d-skeletonization/7268/5 "2024-10-21T20:12:15Z")

</div>

I’m afraid I don’t have anything addressing this problem.
